Level 5 : What will be the output of the following Python code?


for i in range(0,2,-1):

    print("Hello")

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