I have two scripts, the first which reads in a file and outputs a parsed version and then the second which takes the parsed version and parses it further.
How can I amalgamate these two to be a single script.
File 1:
How can I amalgamate these two to be a single script.
File 1:
with open("debt.txt", "r") as infile, open("outting.txt", "w") as outfile: data = infile.read() data = data.replace("£", "") outfile.write(data)File 2:
with open("outting.txt", "r") as infile, open("out.txt", "w") as outfile: for line in infile: outfile.write(line.split()[1] + "\n")