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


for i in [1, 2, 3, 4][::-1]:
    print(i, end=' ')

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