stopwords = [
    'I', 
    'as', 
    'to', 
    'you', 
    'your', 
    'but', 
    'be', 
    'a',
]
paragraph = 'I want to figure out how I can be a better power napper'

def stopwords_stripped(paragraph, stopwords):
    
    words_list = paragraph.split(' ')
    cleaned_list = [word.lower() for word in words_list if word not in stopwords]
    cleaned_str = ' '.join(cleaned_list)
    
    return cleaned_str
    
print(stopwords_stripped(paragraph, stopwords))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: