r/learnpython • • 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

89 comments sorted by

View all comments

40

u/-aRTy- Oct 12 '26

27

u/NothingWasDelivered Oct 12 '26

Imagine you’re processing data. Say, temperature from the last 2 weeks. The data is what it is. You don’t want anything to accidentally change those numbers. So a tuple is a good choice for passing that data around.

8

u/NothingWasDelivered Oct 12 '26

Oops, didn’t mean for this to be a reply to this comment. But whatayagonnado?

23

u/bkdotcom Oct 12 '26

Can't change it now 

It's a tuple