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


d = {0: 'a', 1: 'b', 2: 'c'}
for i in d:
    print(i)

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