Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions