Can someone help me understand why the second comparison between z and c variables resolve as False?
t = [1, 2, 3]
h = t
print(id(h), " ", id(t))
print(h is t)
x = ('bla', t)
y = ('bla', t)
z, c = str(x[1]), str(y[1])
print(id(z), " ", id(c))
print(z is c)
My initial impression is that x[1] and y[1] would be pointing to the same reference since we're directly assigning that index of the tuples to the t variable. Does this mean Python is passing in the value of t rather than the object of the variable? Why does h is t evaluate to True but z is c evaluate to false? *** scratches head ***