+ 2
You probably mean one of these: while my_variable == True: do indented block until my_variable somehow becomes False (or break) while True: do indented block forever (there's no variable to set 'False') or until break Because the question's syntax is problematic ( = is assignment, == is an equivalency test / TRUE should be True / you also need a colon to start the loop block): >>> while=TRUE File "<stdin>", line 1 while=TRUE ^ SyntaxError: invalid syntax
12th Oct 2016, 6:04 AM
Kirk Schafer
Kirk Schafer - avatar