Created
February 28, 2021 06:13
-
-
Save optimumtact/c4086c600712eff0046fe72aca5e23b8 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
inputfilename = input('Enter name of input file to be read (Should be a csv): ') | |
outputfilename = input('Enter name of output file (Outputs a .txt file): ') | |
#Loading entire contents from file into a list. List is formatted like [Location, word phrase, location, word phrase] | |
file = open((inputfilename) , 'r') | |
ofile = open((outputfilename) , 'w') | |
for line in file: | |
line = line.strip().split('-') | |
string = "{1} <a href=\"{0}\" target=\"_blank\">Candidate thread</a>\n".format(line[1], line[0]) | |
ofile.write(string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment