Level 9 : What happens to d?


d = {1: [10, 20], 2: [30, 40]}
e = d.copy()
e[1].append(50)

Author: SandhyaR | Tags: dictionary | 1859+ Python FAQs | Share
identity-operators-(is,-is-not) | attribute | while-loops | single-inheritance | version-check | sys-module | sum-function | while-else-loop | operator-overloading | set | typeerror | control-flow | return-statement | matplotlib | collection | magic-method | center | string-slicing | built-in-function | oops | boolean | object-attribute | assert | benefit | precedence | class-and-object | assignment-operator | class-decorators | using-lists-as-stacks | __all__-attribute | __future__ | mysql | __init_subclass__ | arithmetic-expression | multiple-except-blocks | docstring | min-max-function | recurssion | map-function | append | call | inherit | bitwise-operator | choice | data_structure | zfill-function | expression | mathematical-function | global | comparison | raise-statement | list-comprehension | access-modifier | context-manager | syntax | dataframe-and-series-objects | intering | id-function | lambda | application | memory | dictionary-comprehensions | matrix-list-comprehension | counter | with-statement | random | list-mutation | file-handling | pseudocode | init | postfix | version | data-structures-in-python | multiprocessing | directory-operations | command-line-parsing | operator-and | data-type-conversions | default-arguments | dictionary-methods | python-history | bitwise-operator | built-in | advanced-file-operations | goto-function | namespace | expand-tab | max-min | collections | string-concatenation | nested-loop | quantifiers-(*,-+,-?,-{}) | error | method | immutability | while-and-for-loop | gil | type-conversion | dictionary | counter-function | string-method | using-assertions-(assertequal,-assertraises) | oop | array | arbitrary-arguments-(*args,-**kwargs) | operators | objects | global-keyword | lambda-function | asyncio | print-statement | booleans | swapping | mapping-function | list-comprehensions | introduction-to-multiprocessing | strings | test-discovery | mathematics | conditional-statement | control-flow | compute | joining-and-merging-dataframes | generators | list-join | string-iteration | module | feature | logical-operators | update | format | overriding-methods | input-function | aggregating-data-with-functools.reduce() | list-methods-and-slicing | touples | lists | regex | match | opening-files-(open()) | async | handling-missing-values-(fillna,-dropna) | round-function | key-value-pairs | for | conversion | reading-and-writing-files | exception-handling | classes | thread | logical-operator | operator-or | functions | exponentiation | iterator | set-operation | interpreter | python-repl | using-else-and-finally | python_version | tuple-methods | using-join()-and-is_alive()-methods | complex-number | regular-expression | static-method | binary | odd-number | slicing | file | default-mutable-argument | dicts | syntax-error | mutable | identifier | stack | walking-through-directories-using-os.walk() | lambdas | datatype | descriptors | escape-operator | frozenset | turtle | indexing | matrix | inheritance | destructor | import-method | unit-testing | function-and-scope | list-indexing | else-statement | round | creating-custom-modules | sorting-and-ranking | working-with-temporary-files-using-tempfile | recursion | invalid-list | debugging | string-methods | type-conversion-and-casting | parsing-with-strptime | anchors-(^,-$) | floats | pass | string-formatting | using-yield-in-functions | control-statement | python | pep | indexing:-loc-vs-iloc | data-structure | join | design-principle | generators-in-python | overflow | using-the-threading-module | working-with-binary-files-(rb,-wb) | factorial-function | loop-control | filter-function | integer | boolean-masking | zip | lambda-functions | binary-operation | list-method | python-module | loop-control-statements | operand | filter | head-and-tail | thread-synchronization | defining-functions | string-slicing | string-method | while-loop | condition | scientific-notation | input | loops | data-type | boolean-and-non-boolean | syntaxerror | conditional-statement | type-conversion | polymorphism | name-mangling | data-types | fabs-function | range | library | logical-operator | identity-operator | file_handling | literal-characters-and-special-characters | file-handling | slice | logical-operation | reading-and-writing-large-files-efficiently | error-handling | decorator | string-manipulation | implementation | list-vs-tuple | time-series-with-pandas | class-and-instance-variable | managing-directories-with-os-and-shutil | thread-safe-data-structures-(queue.queue) | statement | numeric | indentation | python-operators | reading:-read(),-readline(),-readlines() | identity-operator | exception | print | loop | deep-copy | variable | assignment-operators | why-use-multiprocessing-over-threading?-(gil) | working-with-dates-and-times | error-handling | iterators | namedtuple | introduction-to-threads | zip-function | math-copysign | heap-memory | sum() | list-slicing | constructor | list,-set,-and-dictionary-comprehensions | staticmethod | comprehension | formatting-with-strftime | creating-and-starting-threads | data-type | methods | parameter | decimal | min-function | string-formatting | raise | rollback | sets | precedence-and-associativity | functional-programming | list-operation | iterable | asyncio-module | tuple-unpacking | numpy | int | list-comprehension | input-function | data-structure | virtual-environment | formal-and-actual-parameter | floating-point-precision | memory-management | bitwise | complex | package-management | higher-order-function | yield | type_conversion | working-with-file-paths | pickling--unpickling | keyword | writing:-write(),-writelines() | operations | immutable-data-type | conditional-statements | datetime.date,-datetime.time,-datetime.datetime | enumerate() | split | using-os-and-pathlib-modules | def | operator | tuples | installation | functional-programming | string | global-variable | software-design | exception-handling | regular-expressions | introduction-to-python | global-variable | filtering-and-indexing | multiple-inheritance | tuple | multithreading | sorting | threading | list | membership-operators-(in,-not-in) | comment | multiple-inheritance | class | math | basic | built-in-function | integers | arithmetic-operation | difference-between-threads-and-processes | sys | python-django | pandas | using-map()-for-transformations | copy | data-structures | function | virtual-environment | else | encapsulation | python-syntax-and-structure | random-function | method-overloading | function-argument | generator | class-and-inheritance | shallow-copy | built-in-modules | sorted | dictionaries | datetime | encoding | syntax-error ...