remove duplicate words

This commit is contained in:
Akbar Rahman 2022-01-27 20:16:33 +00:00
parent 26647ad351
commit 595a70e40c
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

View File

@ -23,6 +23,8 @@ def main(args):
words = [ word[0] for word in words if word[1] > args.frequency_min and word[0].isalpha() and len(word[0]) == args.word_length ] words = [ word[0] for word in words if word[1] > args.frequency_min and word[0].isalpha() and len(word[0]) == args.word_length ]
words.sort(key=lambda word: word[1]) words.sort(key=lambda word: word[1])
# remove duplicates
words = list(set(words))
print(f"wordlist = {json.dumps(words)}") print(f"wordlist = {json.dumps(words)}")
print(f"{args}", file=sys.stderr) print(f"{args}", file=sys.stderr)
print(f"{len(words)=}", file=sys.stderr) print(f"{len(words)=}", file=sys.stderr)