0

Why is 0 left out in the output when I use the continue statement within while loop?

In this code without the continue statement, i = 0 while i<5: print(i) i += 1 the output was 0 1 2 3 4 But when I use the continue statement for the above code, i = 0 while i<5: i += 1 if i==3: continue print(i) the output was 1 2 4 5 I want to know why 0 is left out and 5 is added.

7th Dec 2022, 9:42 AM
Haru
Haru - avatar
0 Respuestas