Level 1 : What is the output?


lst = [10, 20, 30, 40]
print(lst[-1::-2])

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