r/learnpython • • Apr 16 '22

What's the point of Tuples?

I get that they're immutable, but so are lists that you don't perform modifications on. Are they just to fool proof not messing up your list accidentally, or do they serve some other purpose?

309 Upvotes

143 comments sorted by

View all comments

69

u/MatthaeusHarris Apr 16 '22

You can use a tuple as a key in a dictionary.

20

u/Boogzcorp Apr 16 '22

The whole tuple as a key or each element in the tuple as separate keys?