Why does my code not save as the original text? Please explain. This question has been answered by the upmost voted person thank you for you suggestions.
Here is my code:
import re
#where I opened the file
file = open("old.txt")
story = file.readlines()
#Attempt to save file under new name with same format as orginal.
new = open('anotherstory.txt' , 'w')
new.write()
new.close()
# Made the substitution for the name
name = 'heatherly'
subname = 'joe'
nameCount = re.findall(name)
found = re.replace(name, subname)