a_tuple = (1, 2, 3)
print(hash(a_tuple))


# Check if a hashable tuple has the '__hash__' attribute.
print(hasattr((1, 2, 3), "__hash__"))
# Check if an unhashable tuple has the '__hash__' attribute.
print(hasattr(([1, 2], "a", "b"), "__hash__"))


class MyClass:
    pass


x = MyClass

print(hash(MyClass))
print(hash(x))


# Check the equal objects and their hash values.
print(True == 1)
print(hash(True) == hash(1))
# Check the unequal objects and their hash values.
print("god" == "dog")
print(hash("god") == hash("dog"))
