Skip to content

Commit 8d5ae73

Browse files
committed
Remove duplicate lines from text file
1 parent 30097ef commit 8d5ae73

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Remove duplicate lines from Text file/remove_duplicate_lines.py

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
"""
2-
Replace `sample_file_path.txt` with the location of desired text file to remove duplicate lines(full location path if it is not in the same directory as the code file and only tge name if it is in the same directory as the code file).
3-
A new text file "clean_text.txt" will be created in the saem directory as tge code file with no duplicate lines from `sample_file_path.txt`.
4-
"""
5-
61
content = open('sample_file_path.txt','r').readlines()
72

83
content_set = set(content)

0 commit comments

Comments
 (0)