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