def main(file_data: list[str]): uniqlines = list(dict.fromkeys(file_data)) out = open('ips.txt', 'w') out.writelines(uniqlines) out.truncate(out.tell()-1) out.close()