Level 1 : What is the output for the below code?


list = [1, 2, 3, 4, 5]
value = [x&1 for x in list]
print(value)

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