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