主页
Python
Python except 关键词
demo_ref_keyword_except3
运行 ❯
×
更改方向
保存代码
更改主题
# (x/0) raises a ZeroDivisionError: try: x = 1/0 except NameError: print("You have a variable that is not defined.") except TypeError: print("You are comparing values of different type") except: print("Something else went wrong")
Something else went wrong