python中try-except用法
try:
# 一些可能引发异常的操作
except ValueError as e:
# 处理特定的值错误异常
except FileNotFoundError as e:
# 处理文件未找到异常
except Exception as e:
# 处理其他所有类型的异常
try:
# 一些可能引发异常的操作
except ValueError as e:
# 处理特定的值错误异常
except FileNotFoundError as e:
# 处理文件未找到异常
except Exception as e:
# 处理其他所有类型的异常