Question #595

What is the output of the code snippet below?
l = [1, -2, -3, 4, 5]


def f1(x):
    return x < -1


m1 = map(f1, l)
print(list(m1))

This code snippet returns a list which contains True if the corresponding element of the list is smaller than -1 , and False if the corresponding element is greater than -1 . (geeksforgeeks.org/python-lambda-anonymous-functions-filte...)


Comment on Disqus:

Question difficulty: ๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต


Similar questions: