+ 1

can somebody describe the "while true" statement

14th Oct 2016, 1:52 PM
Shahzeb Sheikh
Shahzeb Sheikh - avatar
2 Réponses
+ 10
"while condition:" repeats the instructions in the block while the condition is true. Using "while True:" allows you to loop the execution of the block indefinitely. You can still use break to break out of the loop, but otherwise this is what is called an infinite loop.
14th Oct 2016, 1:58 PM
Zen
Zen - avatar
+ 1
awesome thanks
14th Oct 2016, 1:59 PM
Shahzeb Sheikh
Shahzeb Sheikh - avatar