Level 10 : What will be the output of the following Python code?


a={1:"A",2:"B",3:"C"}
a.clear()
print(a)

Author: HareramG | Tags: dictionary | 1736+ Python FAQs | Share
yield | join | string-slicing | destructor | list-join | matrix | input-function | binary-operation | namedtuple | dictionaries | list-vs-tuple | string-iteration | set | file-handling | list-slicing | data-structure | installation | benefit | datetime | precedence-and-associativity | sum-function | rollback | scientific-notation | default-mutable-argument | update | list | built-in-function | mutable | lists | pep | staticmethod | decimal | zip | center | string | filter-function | interpreter | library | turtle | dicts | keyword | syntax-error | exception | mysql | assignment-operator | deep-copy | basic | conversion | pickling-&-unpickling | dictionary | polymorphism | generators | identifier | set-operation | file | input-function | data-structure | software-design | zfill-function | condition | while-else-loop | logical-operation | list-indexing | sys-module | indexing | match | multiprocessing | round-function | python-module | type_conversion | string-method | counter | variable | round | global-keyword | descriptors | sorting | lambda-function | sys | choice | stack | datatype | collection | init | command-line-parsing | pseudocode | feature | arithmetic-expression | design-principle | functions | frozenset | comment | import-method | matrix-list-comprehension | escape-operator | precedence | memory-management | iterator | comparison | classes | string-concatenation | global-variable | string-formatting | namespace | invalid-list | math-copysign | function | threading | list-comprehension | methods | head-and-tail | int | numpy | control-flow | decorator | conditional-statement | operator-or | filter | memory | while-and-for-loop | class-and-object | while-loop | call | inherit | python | magic-method | higher-order-function | control-statement | immutable-data-type | operator-overloading | loop-control | __future__ | virtual-environment | comprehension | python-django | collections | recurssion | binary | syntax | multithreading | generators-in-python | print | postfix | factorial-function | odd-number | sum() | __init_subclass__ | data_structure | boolean-and-non-boolean | module | python-history | assert | expand-tab | for | function-argument | input | logical-operator | operator-and | mathematics | built-in-function | string-slicing | list-comprehension | multiple-inheritance | application | operators | operator | print-statement | split | bitwise-operator | return-statement | compute | asyncio-module | pandas | math | name-mangling | parameter | bitwise | slice | file-handling | with-statement | swapping | iterable | array | tuple-unpacking | class | regex | nested-loop | slicing | bitwise-operator | python_version | integer | zip-function | data-type | static-method | complex | syntaxerror | type-conversion | id-function | python-repl | attribute | data-type | encapsulation | object-attribute | numeric | min-max-function | error | complex-number | arithmetic-operation | data-structures | functional-programming | enumerate() | conditional-statement | logical-operator | string-manipulation | operand | format | raise | operations | counter-function | typeerror | oop | __all__-attribute | min-function | virtual-environment | thread | append | class-and-instance-variable | regular-expression | string-formatting | built-in | copy | loop | touples | def | range | string-method | random-function | expression | overflow | lambdas | oops | indentation | shallow-copy | file_handling | mathematical-function | tuple | sorted | inheritance | global-variable | function-and-scope | matplotlib | async | type-conversion | lambda | version | map-function | access-modifier | implementation | debugging | method | objects | recursion | immutability | formal-and-actual-parameter | syntax-error | exponentiation | boolean | loops | context-manager | docstring | encoding | constructor | mapping-function | heap-memory | global | exception-handling | floating-point-precision | exception-handling | control-flow | fabs-function | error-handling | identity-operator | max-min | list-mutation | goto-function | list-operation | statement | generator | gil | else-statement | version-check | random | identity-operator | package-management | asyncio | class-and-inheritance | list-method ...