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