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