代码示例:(标识:python_ref_keyword_except_1)
python_ref_keyword_except_1.py
# (x > 3) will raise an error because x is not defined:

try:
  x > 3
except:
  print("Something went wrong")

print("Even if it raised an error, the program keeps running")
运行结果: