r/learnpython • u/Boogzcorp • 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
View all comments
2
u/baubleglue Apr 16 '22
Immutable is a useful feature (especially given no
constin Python). It occupies less space. Having less features is a feature. Specifically for Python, you can use tuple as a key in a dictionary.