Level 9 : What will be the output of the following Python code?


for i in range(float('inf')):
    print (i)

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