filter function using lambda in python

#filter function 

nums1 = [2,3,5,6,76,4,3,2]

bads = list(filter(lambda x: x>4, nums1))

Here is what the above code is Doing:
1. We create a list of numbers called nums1.
2. We create a list called bads.
3. We use the filter function to filter out all the numbers in nums1 that are greater than 4.
4. We print out the list of bad numbers.