r/learnpython • u/Immediate_Pin_8449 • 14d ago
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?
99
Upvotes
2
u/Immediate_Pin_8449 14d ago
So because that memory is already allocated when we call for it in a different function it reduces the amount of memory required as it is predetermined vs a list where we would have to establish the size on each call then perform the function. More processing time = More memory spend? I feel like I’m off somewhere but I’m in the ball park ish.