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


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

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