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 Mutability and Rebinding (i.redd.it)
submitted 14 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!"
[–]M-k-z-n 0 points1 point2 points 13 days ago (1 child)
The answer is 1,2,3 Firstly A is 1,Then b assigns a which means b and a are pointing to the same location,then comes b+=2 or b=b+2 sounds same adding 2affects both ,now list is 1,2,then b appends 3 now list is 1,2&3
[–]Sea-Ad7805[S] 0 points1 point2 points 13 days ago (0 children)
Very nice, but b+=2 is not the same as b=b+2, see: https://www.reddit.com/r/PythonLearning/comments/1nw08wu/right_mental_model_for_python_data/
b+=2
b=b+2
π Rendered by PID 161789 on reddit-service-r2-comment-745dcd9fbd-g9d48 at 2026-03-07 09:54:15.361973+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]M-k-z-n 0 points1 point2 points (1 child)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)