DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python delete duplicate lines in file
with open("file.txt", "r") as txt_file: new_data = list(set(txt_file)) return new_data
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#delete
#duplicate
#lines
#file
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit