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