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