Examveda

What will be the output of the following Python code?
l=[1,2,3,4,5]
[x&1 for x in l]

A. [1, 1, 1, 1, 1]

B. [1, 0, 1, 0, 1]

C. [1, 0, 0, 0, 0]

D. [0, 1, 0, 1, 0]

Answer: Option B


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python