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