try: #業務實現程式碼 except Exception1 as e: #例外處理塊1 ... except Exception2 as e: #例外處理塊2 ... #可以有多個 except ... else: #正常處理塊 finally : #資源回收塊 ...