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