+ 4
Challenge question
a,b=[0],[0] a,b=b,a print(a,b) if (a is b): print ("True") else: print("False") why is it False? I checked the values of a and b,both are[0]
4 Respostas
+ 15
Imagine that both you and your friend bought the same sneakers (x = [sneakers], y = [sneakers]). They are equal to each other (x == y) in both style and price. But these are different sneakers (x is not y)
+ 8
Almost always, but say 1 is always 1, or 'str' is always 'str'
x=1
y=1
print(x is y)
>>>True
+ 1
Михаил Горчанюк does that mean whenever I input a,b=b,a
a is always not b?
+ 1
OK, thank you very much