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


for i in range(int(2.0)):
    print(i)

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