Checkthis's Notes
2017年10月3日 星期二
Python - 例外處理筆記
用法
try:
f = open('cool', 'r') # mode code is supposed to be 'w'
f.write('Test text')
except Exception as e:
print('Error:{}'.format(e))
else:
print('success')
finally:
print('finally')
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言