News

New paper! in the American Naturalist

Tuesday, January 22, 2019

Distinguishing multiple exit points in for loop



For loop in Python has the concept of if-else..!
for x in [1,2,3,4]:
 print(x)
 if x == 3: break
else:
 print("3 doesn't exist")