+ 1

Break for while loop , brings an error please help

i = 5 while True : print(i) i = i -1 if i <= 2: break

3rd Jun 2022, 1:15 AM
Mbalenhle Shamima Nhlapo
Mbalenhle Shamima Nhlapo - avatar
1 Respuesta
+ 4
Check your indentation. The last three lines are not inside the loop.
3rd Jun 2022, 1:21 AM
Simon Sauter
Simon Sauter - avatar