Anyone who wrote the code below must be insane:-)
for x in range(3):
print(x)
else:
print('I am done')
But here it seems perfectly OK:
for x in range(3):
print(x)
if x == 1: break
else:
print('I am done')
To me, the "else" was bonded with "break" (or return, or raise, or...),
not "for". It make sense:-)
--Jach
--
https://mail.python.org/mailman/listinfo/python-list
