Examveda

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: Option D


This Question Belongs to Python Program >> Functions In Python

Join The Discussion

Related Questions on Functions in Python