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