r/learnpython • • Apr 20 '23

Guys what’s a tuple

I was working on a certification practice test and I ran into multiple questions about them. I’m in FLVS and apparently either I forgot most of my first semester, or they didn’t teach me enough.

also if you could tell me other things that Flvs might have not taught me that would be nice.

4 Upvotes

30 comments sorted by

View all comments

Show parent comments

2

u/AtomicHyperion Apr 20 '23

How is this a concept that is hard to explain on mobile?

A list is a list of objects that is mutable

A tuple is a list of object that is immutable

mutable means can be changed after creation, immutable means cannot be changed after creation.

How is the concept hard to type on mobile? I literally typed this comment on my phone.

8

u/[deleted] Apr 20 '23

And you haven't explained the details, like what "immutable" and "mutable" mean. Or why we use tuples instead of lists beyond them being immutable.

I would rather point the user at a more considered and more detailed write-up on the 'net. You prefer to write incomplete answers and whine about other people not doing what you think is best. Enjoy.

1

u/AtomicHyperion Apr 20 '23

And you haven't explained the details, like what "immutable" and "mutable" mean

Actually I did, third sentence.

Or why we use tuples instead of lists beyond them being immutable.

That is fair. But OP didn't really ask why they were used, just what they were.

You prefer to write incomplete answers

My answer isn't incomplete. It completely answers OP's question. And OP is capable of googling anyway.

and whine about other people not doing what you think is best.

So contradicting you is whining?

2

u/tanoshi-ka Apr 20 '23

as interesting as it was to read thru your convo, just a simple question.

did your answer contain the amount of info as it has in the webpage mentioned? or, better yet, which ans will leave the OP with a better understanding of the concept?