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