Answers for "how to get the text from a label in tkinter"

1

how to get the text from a label in tkinter

l = tk.Label(text="hello, world")
...
print("the label is", l.cget("text"))
#Outputs: the labels is hello, world
Posted by: Guest on January-07-2022

Code answers related to "how to get the text from a label in tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language