f1=open("file2_rev.txt","w")
f2=open("myfile2.txt","r")
r=f2.read()
f1.write(r[::-1])
f1.close()
print("Content of actual file:{0}\n".format(r))
f1=open("file2_rev.txt","r")
print("Content of reversed file:{0}\n".format(f1.read()))
f1.close()
