![]() |
While loop struggle - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: While loop struggle (/thread-21585.html) |
While loop struggle - joshp2709 - Oct-05-2019 How can I have a loop continue until a user presses the enter button RE: While loop struggle - jefsummers - Oct-05-2019 Depends. I use wxPython for the GUI, and there is a method wx.YieldIfNeeded() that allows me to respond to button clicks RE: While loop struggle - Aurthor_King_of_the_Brittons - Oct-05-2019 I'm actually in the middle of writing a program for class with one as I read your question. The pseudocode I wrote to describe it is as follows: # prompt user for X, assign to variable # while X is not equal to an empty string: # perform an action # prompt user for X RE: While loop struggle - Aurthor_King_of_the_Brittons - Oct-06-2019 while x != "": That's probably more helpful than pseudocode. |