几年前写的,感觉错误很多(哭脸),把前面没用的都删了把,hhh。
python中try/except/else/finally语句的完整格式如下所示:
try:
Normal execution block
except A as e:
print(e)
except B:
Exception B handle
except:
Other exception handle
else:
if no exception,get here
finally:
print("finally")