Program - python function to identify profane words


Topic: Program - python function to identify profane words

Solution

def profane_filter(str):
    profane_word_url = "https://raw.githubusercontent.com/RobertJGabriel/Google-profanity-words/master/list.txt"
    file = urllib.request.urlopen(profane_word_url)
    for line in file:
        decoded_line = line.decode("utf-8")
    return decoded_line
    str = re.findall(r'\w+', str)
    return [i for i in str if i in decoded_line]



List all Python Programs