2024-04-20 01:50:01 发布
网友
我在最近的一个项目中遇到了这个问题,我很好奇为什么会这样。你知道吗
test_ = None test_1 = [] test_2 = ([], None) if test_: print('hello') if test_1: print('hello') if test_2: print('hello') > hello
因为by definition非空元组的计算结果是True。你知道吗
True
因为by definition非空元组的计算结果是
True
。你知道吗相关问题 更多 >
编程相关推荐