How do I return all the unique words from a text file using Python? For example:
I am not a robot I am a human
I am not a robot
I am a human
Should return:
string = "I am not a robot\n I am a human" list_str = string.split() print list(set(list_str))