Level 10 : What will the following code output?


d = {'x': 1, 'y': 2}
del d
print(d)

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