I want to remove duplicate word from a text file.
i have some text file which contain such like following:
None_None ConfigHandler_56663624 ConfigHa
import json myfile = json.load(open('yourfile', 'r')) uniq = set() for p in myfile: if p in uniq: print "duplicate : " + p del p else: uniq.add(p) print uniq