Source Code:
(back to article)
a = [1,2,3] b = a c = [1,2,3] if all(var is a for var in (a, b, c)): print("All variables are pointing to the same object") else: print("variables are pointing to different object")
Result:
Report an issue