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


a = {1:"A", 2:"B", 3:"C" }
for i in a :
    print(i, end=" ")

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