Vidyalelo
Python · Q111

Functions in Python

Programming · Python · question 111

Q111

What will be the output of the following Python code? l=[1, -2, -3, 4, 5] def f1(x): return x<2 m1=filter(f1, l) print(list(m1))

A.
[1, 4, 5 ]
B.
Error
C.
[-2, -3]
D.
[1, -2, -3]
Answer

Answer: Option D

Solution

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