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