Created
November 28, 2019 10:59
-
-
Save Alamin02/149bb09c30efe9eb74701f9e175ca7b5 to your computer and use it in GitHub Desktop.
This file contains 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
import re | |
word_list = [] | |
with open("text.txt", 'rt') as myfile: | |
for line in myfile: | |
matches = re.findall('\/\/(.+?)\#\#', line) | |
word_list = word_list + matches | |
with open("output.txt", 'w+') as outputfile: | |
for word in word_list: | |
outputfile.write("%s\r\n"% word) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment