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