Python Forum
Python Forum
>
Python Coding
>
GUI
> Getting First 3 characters in a listbox
Full Version:
Getting First 3 characters in a listbox
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
scratchmyhead
Nov-10-2019, 11:45 PM
I'm new to Python so bare with me. I have googled this but can't seem to find the answer. How do I get the first three characters in a Tkinter listbox. Thanks.
Jeff
scratchmyhead
Nov-11-2019, 02:37 AM
This is one way of getting it:
variable1 = listbox1.get(0) print(variable1[:3])
Python Forum
>
Python Coding
>
GUI
> Getting First 3 characters in a listbox