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