Vidyalelo
Python · Q57

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 57

Q57

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]
Answer
C.
[1, 0, 0, 0, 0]
D.
[0, 1, 0, 1, 0]

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board