Python
# Example 2: Checking if two lists refer to the same object
list1 = [1, 2, 3]
list2 = [1, 2, 3]

# Less preferred: Using ==
if list1 == list2:
    print("Lists are equal in value")

# Preferred: Using is
if list1 is list2:
    print("Lists are the same object")

# Note: In this case, list1 and list2 are different objects with the same value,
# so using `is` would give a different result than `==`.
Lists are equal in value