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