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