Ascii converter

This commit is contained in:
2024-11-10 14:31:08 +01:00
parent 11af9b0016
commit 06e51d56f1
6 changed files with 400 additions and 380 deletions

10
removeDuplicatedLines.py Normal file
View File

@ -0,0 +1,10 @@
# Read the file
with open("input-with-duplicates.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-without-duplicates.txt", "w", encoding="utf-8") as file:
file.writelines(unique_lines)