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