summaryrefslogtreecommitdiff
path: root/progs/a933.py
blob: 930e0ad873da1537bd394e5dbf7abf5d1f1757df (plain)
1
2
3
4
5
6
def remove_words(list1, charlist):
    new_list = []
    for line in list1:
        new_words = ' '.join([word for word in line.split() if not any([phrase in word for phrase in charlist])])
        new_list.append(new_words)
    return new_list