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


for i in range(int(float('inf'))):
    print (i)

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