Hi, I am trying to split a string and return specific words.
I know that using string.split() turns the string into a list of specific words.
But how would I go about returning specific words? like the ones that contain certain letters?
This is my code so far:
def e_words(m):
forbid == e
word == m.split()
if forbid in m:
return forbidword
I want forbidword to be the words that contain the letter e.
How would I achieve that?