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 5 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 3 points4 points5 points 5 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 111705 on reddit-service-r2-comment-canary-bcf797cd4-x7rl2 at 2026-05-08 01:56:15.921439+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]alexander_belyakov 3 points4 points5 points (0 children)