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