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