?
The single line equivalent of the following Python code?
The single line equivalent of the following Python code?
l=[1, 2, 3, 4, 5]
def f1(x):
return x<0
m1=filter(f1, l)
print(list(m1))
l=[1, 2, 3, 4, 5]
def f1(x):
return x<0
m1=filter(f1, l)
print(list(m1))
Join the Discussion
Login to post a comment or share your explanation.
Login