def foo(xs):
for i in xs:
if i % 5 == 0:
print('found', i)
break
else:
print('not found')
if __name__ == '__main__':
foo([])
foo([3, 4])
foo([4, 5, 6])
Item 2: for while else
Posted by Logan Chien