Gxlsystem TIY Editor
Gxlsystem 在线教程
改变方向
暗黑模式
demo_python_ref_keyword_raise_1.py:
x = -1 if x < 0: raise Exception("Sorry, no numbers below zero")
C:\Users\My Name>python demo_python_ref_keyword_raise_1.py
Traceback (most recent call last):
File "demo_python_ref_keyword_raise_1.py", line 4, in <module>
raise Exception("Sorry, no numbers below zero")
Exception: Sorry, no numbers below zero