有关于None
print(type(None)) <class 'NoneType'>None是None类
a=''
b=False
c=[]
print(a==None) #False
print(b==None) #False
print(c==None) #False #值不相等def fun():
return None
a = fun()
if not a:
print('S')
else:
print('F')
if a is None:
print('S')
else:
print('F')
#S
#SLast updated
Was this helpful?