New course! Every coder should learn Generative AI!
Try a free lesson1 Answer
+ 1
I don't remember tk code correctly but this should do. Google for correct syntax.
tb = TextBox(...)
while tb.text != 'q': # use 'if' if while can't be used
do stuff
# if input is q
window.exit()