Python - Loop Control
What is the output of the following code?
for i in range(5):
if i == 3:
break
print(i)for i in range(5):
if i == 3:
break
print(i)i == 3, the break stops the loop immediately.i reaches 3, loop stops before printing 3.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions