I have two lists say list1 = [1,2,3,4,5] and list2 = [1,2,3,4,5]. If I do list1 == list2, it will return True. Suppose, I have one more list, say, list3 = [5, 4, 3, 2, 1] and if now I do list1 == list3, it will return False.
Can anyone please explain what is happening behind the scene? Are we comparing the values or references?