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