How do I filter out the letter in the set of words with lambda function?
For example:
I have to filter out every word containing letter "K".
["rabbit", "chuck", "Joe", "war", "rock", "docker"]
["chuck", "rock", "docker"]
I was told to provide the efforts:
list = ["rabbit", "chuck", "Joe", "war", "rock", "docker"]
print(list)
listfilter = list(filter(lambda x: (x == 'k'), lst))
print(listfilter)