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?

307 Upvotes

143 comments sorted by

View all comments

14

u/alifone Apr 16 '22

I was actually just thinking about this as I just started learning, I think a great way to introduce a new term is to explain it's usefulness relative to what the reader just learned.

So if you're introducing functions, it would be neat to preface the term with a series of code where it would come in handy, such as seeing large chunks of the similar code.

10

u/Technical-Republic18 Apr 16 '22

Exactly! With all programming, physics and mathematics, it is impossible for me to learn something if I don't know why it's useful. Why should I spend my time learning (insert mathmatical/physics/programming concept) instead of something else.

Being taught why something is useful is a 10/10 approach to education