QuestionQ32
VerifiedMiscellaneous (List Comprehensions, Lambdas, Closures, I/O)What is the expected output of the following code?
myli = range(-2, 2)
m = list(filter(lambda x: True if abs(x) < 1 else False, myli))
print(len(m))
What is the expected output of the following code?
myli = range(-2, 2)
m = list(filter(lambda x: True if abs(x) < 1 else False, myli))
print(len(m))
Community Discussion