Interview Query

Stop Words Filter

Start Timer

0:00:00

Upvote
16
Downvote
Save question
Mark as completed
View comments (28)
Next question

Given a list of stop words, write a function stopwords_stripped that takes a string and returns a string stripped of the stop words with all lower case characters.

Example:

Input:

stopwords = [
    'I', 
    'as', 
    'to', 
    'you', 
    'your', 
    'but', 
    'be', 
    'a',
]

paragraph = 'I want to figure out how I can be a better data scientist'

Output:

def stopwords_stripped(paragraph,stopwords)
     return(stripped_paragraph) ->

stripped_paragraph = 'want figure out how can better data scientist.'
.
.
.
.
.


Comments

Loading comments.