python中for—else的用法,执行完for执行else

结束for循环后执行else

for i in range(5):
     print(i)
else:
    print("打印else")

原文地址:https://www.cnblogs.com/tester-go/p/8515728.html