26-布尔做除数:True/False 的风险
语法讲解
今天学: False 作为除数
try:
print(10 / False)
except Exception as e:
print(type(e).__name__)
小练习
运行下面代码后输出是什么?
try:
print(10 / False)
except Exception as e:
print(type(e).__name__)
提交要求: 只提交最终输出结果,不要添加多余的说明或引号。
全部评论