I have to print the even numbers by using only the lambda and map function. Not filter and any functions in python.
list(map(lambda x:x%2==0, range(20)))
OUTPUT:
[True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False]
Used the code like below
print(list(map(lambda x:x%2==0, range(20))))
I'm getting the boolean result but I need only even numbers. Is it possible by using a map function with lambda?