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


d = {0, 1, 2}  
for x in d:  
    print(x)

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