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