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 | 1736+ Python FAQs | Share
list-comprehension | round | software-design | pep | iterable | tuple-unpacking | regular-expression | expand-tab | function-and-scope | init | variable | syntax | inheritance | conversion | decimal | exponentiation | condition | data-structure | input | typeerror | pseudocode | goto-function | asyncio-module | string-formatting | zfill-function | __all__-attribute | file | datatype | return-statement | file-handling | string-concatenation | raise | regex | match | package-management | method | append | parameter | id-function | version-check | while-and-for-loop | dictionaries | list | context-manager | while-loop | counter-function | comparison | lists | call | operator | global-variable | name-mangling | operator-and | else-statement | list-indexing | map-function | data_structure | immutability | postfix | multiple-inheritance | frozenset | classes | inherit | mathematics | magic-method | command-line-parsing | python-django | join | boolean-and-non-boolean | global-keyword | built-in-function | operator-overloading | choice | odd-number | version | head-and-tail | input-function | asyncio | function | collection | access-modifier | min-function | formal-and-actual-parameter | list-comprehension | data-type | int | compute | multiprocessing | async | exception-handling | max-min | object-attribute | string-iteration | python | numpy | loop-control | filter | oops | built-in | for | yield | generators | installation | file_handling | dictionary | destructor | encoding | complex-number | list-vs-tuple | logical-operation | numeric | round-function | shallow-copy | global-variable | sorting | sum() | methods | polymorphism | design-principle | identifier | control-flow | range | class-and-object | zip | function-argument | print | library | functions | comment | class-and-instance-variable | operations | logical-operator | control-flow | matrix | type-conversion | virtual-environment | tuple | bitwise | filter-function | random | matrix-list-comprehension | __init_subclass__ | generators-in-python | identity-operator | static-method | data-type | global | threading | boolean | iterator | mathematical-function | update | assignment-operator | class | multithreading | floating-point-precision | memory | min-max-function | expression | string-slicing | feature | thread | arithmetic-operation | mapping-function | list-slicing | logical-operator | operator-or | conditional-statement | bitwise-operator | constructor | file-handling | higher-order-function | oop | docstring | __future__ | memory-management | indexing | namespace | benefit | loop | indentation | class-and-inheritance | string | with-statement | identity-operator | slicing | recurssion | basic | objects | python-module | mysql | array | pickling-&-unpickling | complex | python-repl | list-mutation | turtle | sys | precedence-and-associativity | overflow | escape-operator | loops | precedence | decorator | list-join | debugging | python-history | default-mutable-argument | control-statement | python_version | math | exception-handling | scientific-notation | lambdas | collections | fabs-function | list-operation | sorted | integer | attribute | print-statement | center | nested-loop | operators | staticmethod | encapsulation | assert | stack | application | interpreter | zip-function | operand | swapping | input-function | binary-operation | conditional-statement | type_conversion | lambda-function | math-copysign | keyword | comprehension | dicts | error-handling | descriptors | mutable | datetime | while-else-loop | binary | rollback | string-method | exception | factorial-function | slice | arithmetic-expression | format | heap-memory | built-in-function | string-manipulation | syntaxerror | counter | bitwise-operator | implementation | string-formatting | module | enumerate() | touples | syntax-error | syntax-error | error | string-slicing | sum-function | string-method | recursion | invalid-list | set | immutable-data-type | functional-programming | sys-module | random-function | set-operation | split | deep-copy | generator | pandas | matplotlib | import-method | data-structure | lambda | virtual-environment | data-structures | statement | namedtuple | copy | type-conversion | list-method | gil | def ...