I want to design a function to compare lists and return True only if
both lists are equal considering memory location of the list.
I suppose it would be the equivalent of comparing 2 pointers in c++
lets call this function check(a, b)
and define a few lists:
I want it to have the following behaviour:>>l0 = [1, 2, 3, 4]
l1 = [1, 2, 3, 4]
l2 = l0
False>>check(l1, l0)
True>>check(l2, l0)
False>>check(l1, l2)
Any idea how to do this with Python?