Simple code upload

This commit is contained in:
2024-11-10 14:22:19 +01:00
parent e6f9fd802e
commit 11af9b0016
3 changed files with 897 additions and 0 deletions

10
script.py Normal file
View File

@ -0,0 +1,10 @@
# Read the file
with open("input.txt", "r", encoding="utf-8") as file:
lines = file.readlines()
# Remove duplicates by converting to a set, then back to list to keep the order
unique_lines = set(lines)
# Write the unique lines back to the file or a new file
with open("output.txt", "w", encoding="utf-8") as file:
file.writelines(unique_lines)