Vidyalelo
Python · Q117

Functions in Python

Programming · Python · question 117

Q117

What will be the output of the following Python code? odd=lambda x: bool(x%2) numbers=[n for n in range(10)] print(numbers) n=list() for i in numbers: if odd(i): continue else: break

A.
[0, 2, 4, 6, 8, 10]
B.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Answer
C.
[1, 3, 5, 7, 9]
D.
Error

Answer: Option B

Solution

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