I need your help to write script python to remove last point in a text file.
I tried to remove a point from last sentence for first Without success.
f = open('text.txt','r')
last = f.readlines()
f.close()
f2 = open('text.txt','w')
last_line = last[-1:]
for i in range(0,(len(last)-1)):
if i == len(last)-1:
f2.write(last[i].replace('.',' '))
f2.close