How to repeat a loop once it is finished
Denis McMahon
denismfmcmahon at gmail.com
Thu Oct 15 10:27:58 EDT 2015
More information about the Python-list mailing list
Thu Oct 15 10:27:58 EDT 2015
- Previous message (by thread): How to repeat a loop once it is finished
- Next message (by thread): Adding Bottle framework in existing python script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 15 Oct 2015 06:29:24 -0700, abbasmo wrote:
> what would be a small thing that I could add to make this thing run
> again?
See what happens when you run the following code. Then adapt it to your
application.
stop = False
while not stop:
x = input("enter something, quit, stop or end to exit: ")
print("you entered: ", x)
if x in ["stop","quit","end"]:
stop = True
print("Finished now")
--
Denis McMahon, denismfmcmahon at gmail.com
- Previous message (by thread): How to repeat a loop once it is finished
- Next message (by thread): Adding Bottle framework in existing python script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list