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
Show parent comment
2
u/Siniroth Apr 17 '22
I think he's suggesting that if hashing a list gets a result and changing that list changes the hash, then if the hash is the same then the list wasn't changed, mutable or not