Level 9 : What is printed?


x = {"a":1}
y = x
y["b"] = 2
print(x)

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