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