立即学习:https://edu.csdn.net/course/play/27668/373322?utm_source=blogtoedu
###debug语句
try
except Exception as e:
print("出错:", e)
else: #没有异常时执行的代码
print("本次循环执行无异常!")
finally: #无论是否有异常,都会执行的代码
print("本次循环执行完毕")
立即学习:https://edu.csdn.net/course/play/27668/373322?utm_source=blogtoedu
###debug语句
try
except Exception as e:
print("出错:", e)
else: #没有异常时执行的代码
print("本次循环执行无异常!")
finally: #无论是否有异常,都会执行的代码
print("本次循环执行完毕")