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


for i in 'abcd'[::-1]:
    print (i)

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