9 lines
142 B
Python
9 lines
142 B
Python
x = 2
|
|
print x == 2 #true
|
|
print x is 2 # true
|
|
print x == 3 #false
|
|
|
|
str1 = "hello"
|
|
str2 = str1
|
|
print str1 is str2 #true
|
|
print str1 == str2 #true |