Python異常的錯誤處理[ try-except ]

Python異常的錯誤處理[ try-except ]

Python異常的錯誤處理[ try-except ]

 

 

資料來源: https://github.com/stormzhang/free-programming-books/blob/master/assets/python/Python%E6%A0%B8%E5%BF%83%E7%BC%96%E7%A8%8B%EF%BC%88%E4%B8%AD%E6%96%87%E7%AC%AC%E4%BA%8C%E7%89%88%EF%BC%89%E5%B8%A6%E7%9B%AE%E5%BD%95.pdf 的p49~p50

 

# -*- coding: UTF-8 -*-

#Python異常的錯誤處理[ try-except ]

a = 22

b = 33

try:

    if a < b:

        print(n)

except:

    print(“except”)

 

print(“after exception….”)

 

 

 

 

 

 

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *