print("eogn" in "hello eogn")
print("e" in "hello eogn")
True
True
print(1 in [1,2,3])
print('x' in ['x','y','z'])
True
True
print('k1' in {'k1':111,'k2':222})
print(111 in {'k1':111,'k2':222})
True
False
print("eogn" not in "hello eogn")
print("e" not in "hello eogn")
False
False
print(1 not in [1,2,3])
print('x' not in ['x','y','z'])
False
False
print('k1' not in {'k1':111,'k2':222})
print(111 not in {'k1':111,'k2':222})
False
True
x = 1
y = 1
print(x is y)
True
x = 1
y = 2
print(x is y)
False
x = 1
y = 1
print(x is not y)
False
x = 1
y = 2
print(x is not y)
True
原文:https://www.cnblogs.com/xuexianqi/p/12425826.html