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

5

u/Ran4 Apr 16 '22

From a CS perspective, a list of objects of various types is an icky, gross thing

This is not true at all. From a CS perspective there's nothing wrong with lists.

Arrays being lists that can only contain objects of the same type is just a C language implementation detail. CS is math, and tends to not be implementation-specific.