Python Forum
[Tkinter] Getting First 3 characters in a listbox
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Getting First 3 characters in a listbox
#1
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
Reply
#2
This is one way of getting it:

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


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020