Level 1 : What does this snippet do?


lst = [0, 1, 2, 3]
lst = [i for i in lst if i % 2 == 0][::-1]
print(lst)

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