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