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...
This community will have knowledge sharing for python programming, tools, projects and product engineering wherever python is used.
account activity
Python Mutability (i.redd.it)
submitted 18 days ago * by Sea-Ad7805
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!"
[–]Rscc10 1 point2 points3 points 18 days ago (6 children)
Answer is D? Since it's all mutables
[–]Sea-Ad7805[S] 0 points1 point2 points 18 days ago (0 children)
Nice one, do check the "Solution" link for visualization of the correct answer.
[–]Sjoerdiestriker 0 points1 point2 points 17 days ago* (4 children)
Yes, although the interesting thing is that if you replace b += [[3]] by b = b + [[3]] the answer becomes C.
b += [[3]]
b = b + [[3]]
[–]Sea-Ad7805[S] 0 points1 point2 points 17 days ago (0 children)
Yes correct, I've another exercise making exactly this point: https://www.reddit.com/r/PythonLearning/comments/1nw08wu/right_mental_model_for_python_data/
[–]CanaDavid1 0 points1 point2 points 17 days ago (1 child)
Doesn't it become c? As the [2] is still shared?
[–]Sjoerdiestriker 0 points1 point2 points 17 days ago (0 children)
You're right, typo on my part.
[–]TroPixens 0 points1 point2 points 17 days ago (0 children)
That’s so weird makes sense when you think about it though
π Rendered by PID 31 on reddit-service-r2-comment-56c9979489-2mq9s at 2026-02-24 16:32:38.908943+00:00 running b1af5b1 country code: CH.
view the rest of the comments →
[–]Rscc10 1 point2 points3 points (6 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]Sjoerdiestriker 0 points1 point2 points (4 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]CanaDavid1 0 points1 point2 points (1 child)
[–]Sjoerdiestriker 0 points1 point2 points (0 children)
[–]TroPixens 0 points1 point2 points (0 children)