while else

count = 0
while count <= 5:
    count +=1
    if count = 3: break
    print("Loop",count)
else:
    print("循环执行完了")
print("-----out of while loop-----")

 

posted @ 2018-08-06 22:12  Drives  阅读(45)  评论(0)    收藏  举报