- 1

Can you explain me please, why does the result start from 1, and not from 0

i=0 while True: i=i+1 if i==2: print("skipping 2") continue if i==5: print("breaking") break print(i)

29th May 2018, 8:07 AM
Ruslan 🇰🇿
Ruslan 🇰🇿 - avatar
2 Answers
0
i is 0 the you do i = i + 1 so i is now 1 and then you print(i)
29th May 2018, 8:41 AM
Max
Max - avatar
- 1
I see. Thank you, guys.
29th May 2018, 9:26 AM
Ruslan 🇰🇿
Ruslan 🇰🇿 - avatar