You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filter takes two arguments, a function and a sequence. The function takes one item and return True if the item should. It is automatically called for each item in the sequence.
'''
print("-------------------- (1)")
nums = [3, 4, 6, 7, 0, 1]
evens = list(filter(lambda num: num % 2 == 0, nums))