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