awesome-fastapi-projects/scripts/delete_duplicates.py

14 lines
204 B
Python
Raw Permalink Normal View History

2020-07-09 22:20:38 +00:00
f_in = open("links.txt", "r")
f_out = open("unique_links.txt", "w")
links = set()
for line in f_in.readlines():
links.add(line)
for link in links:
f_out.write(link)
f_in.close()
f_out.close()