print('---exception handle before--- ')
try:
print('try execute')
## print(c)#show error
except Exception as XXX :
print('when program is error execute this ,show error:',XXX)
else:
print('when program no error will execute this')
finally:
print('this one always execute')
print('---exception handle after---')
try异常语法
最新推荐文章于 2023-06-20 15:21:42 发布