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

Show parent comment

6

u/SoDifficultToBeFunny Apr 17 '22

The order of the components is not maintained in a set. But order is maintained and important in a tuple. So, I guess "immutable + ordered values" is what we are trying to communicate when we use it...

2

u/Jenret1382 Apr 17 '22

Thank you :)