Level 10 : 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 | 1736+ Python FAQs | Share
math-copysign | goto-function | lambda | pep | binary | logical-operator | boolean | generator | else-statement | built-in-function | library | def | name-mangling | list-comprehension | while-else-loop | version | lambda-function | enumerate() | comprehension | identifier | binary-operation | indentation | namespace | file | oop | set | syntaxerror | deep-copy | string-formatting | mysql | list-operation | arithmetic-expression | comparison | class-and-inheritance | min-max-function | global-variable | python | python-repl | operator-or | string-method | magic-method | package-management | function-and-scope | datatype | global-variable | classes | memory | version-check | set-operation | complex-number | scientific-notation | implementation | turtle | list | boolean-and-non-boolean | list-indexing | built-in-function | objects | datetime | module | logical-operator | file_handling | random | exception | print | iterator | methods | identity-operator | inheritance | yield | zip | destructor | list-vs-tuple | operator-overloading | memory-management | python-django | range | statement | invalid-list | raise | integer | functions | conversion | pickling-&-unpickling | string-iteration | loops | syntax | input-function | control-flow | operations | lists | encoding | application | built-in | sorted | for | odd-number | int | operator-and | keyword | exception-handling | round | multiprocessing | string-manipulation | class-and-instance-variable | encapsulation | matrix-list-comprehension | operator | filter-function | feature | collections | tuple-unpacking | gil | round-function | bitwise | virtual-environment | typeerror | postfix | matrix | nested-loop | numeric | random-function | object-attribute | exception-handling | join | return-statement | escape-operator | pandas | choice | string-concatenation | dictionary | software-design | inherit | virtual-environment | operators | context-manager | comment | debugging | touples | heap-memory | arithmetic-operation | stack | mathematics | sorting | __future__ | multithreading | precedence-and-associativity | list-comprehension | data-type | input | formal-and-actual-parameter | design-principle | functional-programming | sum() | data-type | data_structure | access-modifier | exponentiation | class-and-object | with-statement | max-min | command-line-parsing | data-structure | logical-operation | immutable-data-type | compute | control-flow | asyncio | loop | regex | method | python_version | variable | immutability | string-formatting | match | string-slicing | function-argument | list-slicing | default-mutable-argument | generators-in-python | constructor | __init_subclass__ | call | update | complex | interpreter | string-slicing | list-method | error-handling | assignment-operator | benefit | map-function | dictionaries | tuple | type-conversion | numpy | threading | function | thread | sum-function | rollback | decimal | loop-control | multiple-inheritance | static-method | list-join | data-structure | center | zfill-function | generators | floating-point-precision | copy | condition | zip-function | import-method | attribute | installation | polymorphism | bitwise-operator | syntax-error | array | string | sys | type-conversion | fabs-function | higher-order-function | file-handling | while-and-for-loop | math | pseudocode | async | __all__-attribute | split | basic | python-history | conditional-statement | format | parameter | recurssion | control-statement | conditional-statement | expand-tab | input-function | iterable | list-mutation | dicts | matplotlib | class | indexing | mapping-function | append | string-method | sys-module | counter | while-loop | staticmethod | frozenset | expression | precedence | syntax-error | namedtuple | global | print-statement | decorator | mutable | descriptors | factorial-function | shallow-copy | regular-expression | init | lambdas | data-structures | mathematical-function | python-module | swapping | head-and-tail | slice | error | file-handling | counter-function | asyncio-module | operand | filter | id-function | identity-operator | docstring | type_conversion | slicing | overflow | oops | recursion | assert | min-function | bitwise-operator | collection | global-keyword ...