Python - For Loop
Identify the problem in this code:
for i in range(3):
print(i)
else:
print('Finished')for i in range(3):
print(i)
else:
print('Finished')for loop must be indented. Here, print(i) is not indented.else block is correctly aligned with for and indented properly.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions