Last active
March 31, 2020 17:27
-
-
Save piyh/72e1abafe70ad433203348cdf10ad1e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#word_list = ['hello','there','general','kenobi'] | |
#word = ['hello','there'] | |
import os, os.path as path | |
os.chdir("E:\\kingcobrajfs") | |
wordList =[] | |
with open('wordlist_remove.txt', 'r') as words: | |
for line in words: | |
wordList.append(line.strip()) | |
with open('workfile', 'r') as inbound: | |
readFile = "" | |
for line in inbound: | |
readFile = readFile + ' ' + line.strip() + ' \n \n' | |
with open('workfileProcessed', 'w') as outbound: | |
outbound.write(' \n'.join([i for i in readFile.split() if i not in wordList])) | |
print('done') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment