DEV Community

Discussion on: Python: What is a tuple?

Collapse
bezirganyan profile image
Grigor Bezirganyan

Also, One more interesting usage of tuples is that you can use them as a key for dictionaries. (Dictionaries only accept immutable data types as key)

d = {}
d[(obj1, obj2, obj3)] = value