articles = ['and', 'a']
newText = ''
for word in text.split(' '):
    if word not in articles:
        newText += word + ' '
return newText[:-1]
Remove all articles, connector words, etc., from a string in Python