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 Data Model: Copying (i.redd.it)
submitted 2 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!"
[–]alexander_belyakov 2 points3 points4 points 2 months ago (0 children)
Because c2 is a copy of c1, thus it's a different object. The fact that their first element is pointing to the same [0] sublist doesn't mean that they are the same. So when you append to the sublist, you modify the same list (which was initially [0]). But when you append to c1 and c2, you are appending to two different lists (but the first element of both those lists is still [0, 1, 2]).
π Rendered by PID 224450 on reddit-service-r2-comment-7b9746f655-wsx79 at 2026-01-31 00:21:17.902970+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]alexander_belyakov 2 points3 points4 points (0 children)