DPR-blocked-sites/runners/z_remove_duplicates.py

8 lines
219 B
Python
Raw Normal View History

def main():
inp = open('ips.txt', 'r')
uniqlines = list(dict.fromkeys(inp.readlines()))
inp.close()
out = open('ips.txt', 'w')
out.writelines(uniqlines)
out.truncate(out.tell()-1)
out.close()