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