I am looking for a way to copy a txt file and modify it so that every sentence begins a new line.
I am very new to programming in Python and would like some help explaining how can I do this.
For example,
First sentence. Second. Third.
Should be
First sentence.
Second.
Third.
This is what I have so far:
f=open('a.txt')
f1=open('b.txt','a')
with open('a.txt', 'r') as file:
string = file.read().replace('.', '.\n')
with open('b.txt', 'w') as b:
b.write(string)
f1.close()
f.close()