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