Question: Q3: Filter out those words. While working at a chat service, you discovered that some people were choosing to use some unsavory language while chatting

 Q3: Filter out those words. While working at a chat service,

Q3: Filter out those words. While working at a chat service, you discovered that some people were choosing to use some unsavory language while chatting with one another. You decided to create a list of banned words and a flter to catch all of those banned words. Your function should take in a list of words and a list of banned words. It should then apply a filter on the list of words with the premise that none of the banned words should get through. This must be done using a filter funtion and lambda expression def filter words (words to_check, banned words) : >>> filter-words (["today", "is", "a","bad","day"),("bad" ,"worse")) 'today ist,a 'day >>> filter-words (["you", "are"."a","mean","person"), t"mean","evil")) 'you', are',a,'person' >>> filter words (["you", "are","a"mean","person" "MEAN", "evil") I'you', 'are', 'a',mean', 'person YOUR CODE GOES HERE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!