$ python >>> lst1 = [1, 2, 3] >>> lst2 = [1, 2, 3] >>> lst1 == lst2 True >>> lst1 is lst2 False >>> lst3 = lst1 >>> lst3 is lst1 True >>> set([1, 2, 3]) set([1, 2, 3]) >>> set([1, 2, 3]) == [1, 2, 3] False >>> lst4 = [lst1, lst2] >>> lst5 = [lst1, lst2] >>> lst4 == lst5 True >>> lst4 is lst5 False >>> lst4[0] == lst5[0] True >>> lst4[0] is lst5[0] True >>> >>> lst1 = [] >>> lst2 = [] >>> lst1.append(lst2) >>> lst2.append(lst1) >>> lst1 [[[...]]] >>> lst2 [[[...]]] >>> lst1 is lst2 False >>> lst1 == lst2 Traceback (most recent call last): File "", line 1, in RuntimeError: maximum recursion depth exceeded in cmp >>>