r/learnpython • u/Immediate_Pin_8449 • Oct 12 '26
Tuples..I don’t get it
Hi crew, I’m a Python newbie and I just learned about the concept of tuples.
We can’t change them.if we want to store we have to start at the index we want + 1.
I just don’t get it. Why wouldn’t we just use lists? When would we ever need this?
100
Upvotes
View all comments
Show parent comment
3
u/HommeMusical Oct 13 '26
They are massively useful for really large engineering and science issues.
For example, in "finite element analysis", something like an airplane is divided into a huge number of tiny little elements, and then a huge matrix represents the direct relationships between those elements lets you model the whole thing.
However, one tiny element only has direct relationships with a handful of other elements, so you have this massive matrix, say 10 million by 10 million, but only say a dozen elements in any row or column are non-zero, so you have a matrix with 100 trillion locations of which less than 100 million - that is, 0.0001% - are non-zero.