Login Register






Basic Anti Dupe Line Remover filter_list
Author
Message
Basic Anti Dupe Line Remover #1
lines_seen = set() # holds lines already seen
with open("Output_file.txt", "w") as output_file:
for each_line in open("Input_file.txt", "r"):
    if each_line not in lines_seen: # check if line is not duplicate
        output_file.write(each_line)
        lines_seen.add(each_line)


just past it into file and save with .py extension
(This post was last modified: 12-22-2021, 09:03 PM by ENCRYP73D_GH05T.)

Reply

RE: Basic Anti Dupe Line Remover #2
Nice one.

I assume this will effectively remove dupes from combo lists?
[Image: AD83g1A.png]

Reply

RE: Basic Anti Dupe Line Remover #3
(12-23-2021, 01:32 AM)mothered Wrote: Nice one.

I assume this will effectively remove dupes from combo lists?

Yes Sir !! ignore trash coding tho

Reply

RE: Basic Anti Dupe Line Remover #4
(12-23-2021, 02:27 AM)ENCRYP73D_GH05T Wrote:
(12-23-2021, 01:32 AM)mothered Wrote: Nice one.

I assume this will effectively remove dupes from combo lists?

Yes Sir !! ignore trash coding tho
The coding Is fine. The main thing Is, It serves Its purpose.

Much appreciated
[Image: AD83g1A.png]

Reply