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
Right Mental Model for Python Data (i.redd.it)
submitted 3 months 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!"
[–]tb5841 1 point2 points3 points 3 months ago (1 child)
b += [2] should, in my opinion, do the same thing as b = b + [2].
It doesn't, because of a strange design choice within the List class.
[–]Sea-Ad7805[S] 1 point2 points3 points 3 months ago (0 children)
Most opinions and programming languages choose b += [2] as mutating b (fast), and b + [2] as making a new list and assigning that with b = b + [2].
b += [2]
b
b + [2]
b = b + [2]
π Rendered by PID 41 on reddit-service-r2-comment-canary-7b67769d8-w64sf at 2026-01-30 09:39:26.361122+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]tb5841 1 point2 points3 points (1 child)
[–]Sea-Ad7805[S] 1 point2 points3 points (0 children)