0
What does while true does?
2 Answers
+ 3
It continued to loop through inside code as long as condition remains true
+ 1
________________
I=0. |
while i<=3: |
i+=1. |
________________|
this concept works on boolean
means a thing will executed until something is "True"
means in first condition i=0 then i=2 then i=3
every condition will be checked in the last case when it will check the condition it will return True and the loop will broke
but when if you will do this
while True:
#code
means the condition will go on untill broken by a break statement like this
while True: #code will stop instantly
break