False and True keywords in Python

 False: Boolean type, false. When the condition judgment is not established, it returns False.

 

# == Determine whether the values ​​of two objects are equal  
print ('' == False)
# False

print (None == False)
# False

print ([] == False)
# False

print (() == False)
# False

print ({} == False)
# False
# is Determine whether two objects are referenced from the same address space 

print ( '' is False) # False print (None is False) # False print ([] is False) # False print (() is False) # False print (( } is False) # False

Guess you like

Origin www.cnblogs.com/hany-postq473111315/p/12257604.html