try : # code that you want to protect from exceptions except ... (b) must not be zero') try: result = divide(10, 0) except ValueError as e: print(e) else: ...
確定! 回上一頁