I wanted to try something seemingly easy, but I can't wrap my head around this.
I want to open a .txt file, remove all dots from the text, and write the altered .txt as a new file.
#!python
def process_file():
infile = open("dots.txt", "r")
outfile = open("no_dots.txt", "w")
for x in infile: # I'm pretty lost here.
"." = " " # --------^
outfile.write() # ----^
infile.close()
outfile.close()
def main():
process_file()
print ("Done.")
main()
Any ideas? :-/