# 变量为空的情况
# a=""
# list1=[]
# dist={}
# d=0
# f=None
# 非空即真,非零即真
# 用非空即真和非零即真可以有效较少代码
# if ture:
# xxxx
# else:
# xxx
if a: # 如果a的结果是true,则执行if里的,否则执行else里的
print("a为空")
else:
print("a不为空")
if not a: # 如果not a的结果是true,则执行if里的,否则执行else里的
print("a为空")
else:
print("a不为空")