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