版权声明:学习分享,共同进步 https://blog.csdn.net/Andrew_jdw/article/details/82664908
a = []
if a:
print("this list is not null")
else:
print("this list is null")
运行结果如下:
a = []
if a:
print("this list is not null")
else:
print("this list is null")
运行结果如下: