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