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

113

u/NerdyWeightLifter Oct 12 '26

Being immutable like that means the underlying data structure can be simpler and more efficient.

Being immutable also makes them useful as keys in dictionaries. Keys in dictionaries can't change once you insert something.

11

u/Immediate_Pin_8449 Oct 12 '26

They are teaching me about dictionaries next so this makes me hopeful it will make a lot more sense soon.

10

u/Moikle Oct 13 '26

Why not do a little research on your own ahead of time? Take a look at w3schools or realpython

https://www.w3schools.com/python/python_dictionaries.asp

https://realpython.com/python-dicts/

Remember these websites and don't just wait to be taught things. Go and look them up yourself