+ 1
how will this give 3 as output??
how many numbers does this code print?? i = 5 while True: print(i) i = i - 1 if i <= 2: break
2 Answers
+ 3
3 values from 5 to 3. After printing 3, i is decremented (=2), the condition in the if is true so we enter it, and then the break makes us exit the loop.
+ 1
3