【发布时间】:2020-05-16 06:39:32
【问题描述】:
在python中为什么
zero = 0
one = 1
if zero:
print('True') # this print nothing
if one:
print('True') # this print True
我想当zero = 0时,这应该是正确的。应该给我True,但为什么什么都没有?如果这是对的,为什么当 if one 时,它给了我 True?
【问题讨论】:
标签: python python-3.x