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