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