Level 9 : What is the output?


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

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