异常
def execpt_test(a, b):
result = a / b
return result
def divide_numbers(a, b):
try:
execpt_test(a, b)
except ZeroDivisionError:
print("除数不能为零!")
print(divide_numbers(10, 0))
标签:divide,Python,test,result,print,execpt,异常 From: https://www.cnblogs.com/sunbines/p/17586833.html