+ 1
For loop
Why the output is 17 for this loop? Please help! count = 20 for x in range(0,10): count = count - 1 if x == 2: break print(count)
2 Respostas
+ 1
x= 0, 1 and 2 in the loop
20 -1, -1 and -1 = 17
if x == 2 the loop will be left
+ 1
Thank you for your response!