Python Forum

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.
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
This is one way of getting it:

 
variable1 = listbox1.get(0)
    print(variable1[:3])