Level 1 : What is the output for the below code?


a = [1,2,3,4]
print(a[::-1])

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