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