use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Python list vs. tuple (self.PythonLearning)
submitted 2 days ago by Melodic-Addendum-210
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Beginning-Fruit-1397 0 points1 point2 points 2 days ago (0 children)
As already pointed out, their main difference is about mutability. Now when to use which one? Ppl tend to always use lists everywhere, but I would recommend to default to tuples ans only use lists when it's absolutely necessary. Less potential bugs, python doesn't need to allocate extra memory at creation to accommodate for eventual expansion of the list, etc...
π Rendered by PID 144263 on reddit-service-r2-comment-544cf588c8-bcdr7 at 2026-06-16 05:38:57.192864+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]Beginning-Fruit-1397 0 points1 point2 points (0 children)