Python learning record W1-14: continue

for i in range(10):
    if i<5:
        print (i)
    else:
        continue

    print ("hehe")


break is to end the loop, continue is to jump out of the current count for the next count, after continue does not execute the next print ("hehe"), but directly jumps to the count of i=6

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324622881&siteId=291194637