My code works but the problem is that replaces at the wrong places.
Could somepone take a look and better my code.
def find():
openfile = open(filename, "rt")
closefile = open(filename, "wt")
inp1 = input(search)
inp2 = input(replace)
for line in fileopen:
newword = fileout.write(line.replace(inp1, inp2))
openfile.close()
closefile.close()
return newword
find()