Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 30097ef

Browse files
Remove duplicate lines from text file
1 parent e1ada14 commit 30097ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Remove duplicate lines from Text file/remove_duplicate_lines.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
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 the code file with no duplicate lines from `sample_file_path.txt`.
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`.
44
"""
55

66
content = open('sample_file_path.txt','r').readlines()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /