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