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