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 | 1736+ Python FAQs | Share
dictionary | mathematics | string-method | identity-operator | context-manager | precedence-and-associativity | loop | type-conversion | match | syntax-error | arithmetic-operation | comment | list | tuple-unpacking | built-in-function | built-in-function | list-comprehension | command-line-parsing | asyncio | sys | objects | goto-function | overflow | filter-function | input | zfill-function | string-formatting | call | global-keyword | math | control-statement | type_conversion | python-django | default-mutable-argument | raise | lists | datetime | assert | immutability | bitwise-operator | operator-and | global-variable | file_handling | regular-expression | keyword | scientific-notation | lambdas | random | operators | bitwise | zip | bitwise-operator | virtual-environment | expression | fabs-function | round-function | dictionaries | pickling-&-unpickling | memory-management | import-method | functional-programming | decorator | indentation | parameter | counter-function | integer | init | math-copysign | module | zip-function | lambda-function | destructor | asyncio-module | python-history | error-handling | list-comprehension | multiple-inheritance | namedtuple | global | enumerate() | arithmetic-expression | string-slicing | rollback | operand | choice | factorial-function | floating-point-precision | collection | complex-number | sorting | max-min | __all__-attribute | syntaxerror | attribute | precedence | identity-operator | format | collections | methods | generators-in-python | static-method | thread | stack | function | else-statement | string-method | matrix | expand-tab | comprehension | interpreter | classes | version-check | pseudocode | operator-or | min-max-function | sum() | python_version | print-statement | threading | exception | string | range | indexing | comparison | built-in | exception-handling | return-statement | gil | while-and-for-loop | update | logical-operator | higher-order-function | syntax-error | list-mutation | sum-function | pandas | memory | class-and-instance-variable | conditional-statement | operator | lambda | min-function | binary-operation | version | list-join | encoding | counter | copy | debugging | input-function | control-flow | condition | string-concatenation | descriptors | identifier | data-type | escape-operator | swapping | inheritance | dicts | random-function | class-and-inheritance | oops | string-iteration | polymorphism | turtle | file | complex | numpy | global-variable | __future__ | formal-and-actual-parameter | with-statement | shallow-copy | operations | center | constructor | input-function | assignment-operator | python-repl | name-mangling | append | object-attribute | immutable-data-type | list-vs-tuple | file-handling | virtual-environment | generators | implementation | control-flow | data_structure | list-operation | filter | conditional-statement | syntax | numeric | python-module | head-and-tail | variable | class-and-object | exponentiation | recurssion | array | function-and-scope | staticmethod | binary | loops | python | nested-loop | frozenset | mutable | heap-memory | access-modifier | iterator | async | mysql | typeerror | statement | application | class | map-function | boolean | logical-operator | design-principle | matrix-list-comprehension | function-argument | recursion | __init_subclass__ | mapping-function | docstring | mathematical-function | id-function | deep-copy | sorted | round | conversion | decimal | compute | logical-operation | feature | datatype | package-management | list-method | list-indexing | library | string-slicing | operator-overloading | touples | software-design | tuple | installation | sys-module | invalid-list | oop | postfix | matplotlib | slice | odd-number | join | while-else-loop | basic | pep | multiprocessing | inherit | set-operation | print | multithreading | split | loop-control | slicing | type-conversion | boolean-and-non-boolean | method | generator | while-loop | file-handling | data-structure | data-structure | def | for | magic-method | exception-handling | data-type | list-slicing | yield | int | string-formatting | data-structures | set | benefit | string-manipulation | functions | namespace | regex | encapsulation | error | iterable ...