def unique_words(string, ignore_case=False):
    key = None
if ignore_case:
    key = str.lower
return ' '.join(unique_everseen(string.split(), key=key))
string2 = unique_words(string1)
How can I remove duplicate words in a string with Python?