Python path and append

Seymore4Head Seymore4Head at Hotmail.invalid
Mon Apr 25 14:10:58 EDT 2016


On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head
<Seymore4Head at Hotmail.invalid> wrote:

I am going to forget using a directory path.
I would like to take the file win.txt and append a space and the *
symbol.

f = open('win.txt', 'r+')
for line in f:
    f.read(line)
    f.write(line+" *")

This doesn't work.  Would someone fix it please?  It is for a task I
am trying to accomplish just for a home task.



More information about the Python-list mailing list