Python, How to do deleting work in a file? -
i know position of file pointer,and want delete preceding char.
of course can create file,writing in left content,which not way want.
in other word,i want "inplace".thank you.
for line in fileinput.input('file.txt', inplace=true): line = ... # edit line print line, # stdout redirected file
Comments
Post a Comment