[Tutor] can I make a while loop true again

Ian D duxbuz at hotmail.com
Tue Feb 11 12:06:49 CET 2014


Thanks for the help on the last one.

Is it possible to restart a while loop? This doesn't work at all (surprise surprise)

import turtle as t

def start():
    global more
    more = True
    
def stop():
    global more
    more = False

more = True

while True:
    while more:

        t.onkey(stop, "space")
        t.onkey(start, "Up")
        t.fd(1)
        t.listen() 		 	   		  


More information about the Tutor mailing list