python find duplicate words in string