If you want to read an entire file, append a space and asterisk and write it to 
another file, this is the code you need:

infile = open('win.txt', 'r')
text = f.read()
infile.close()
text += " *"
outfile = open('outfile.txt', 'w')
outfile.write(text)
outfile.close()

If, on the other hand, you wish to read a file and append a space and asterisk 
TO THE END OF EVERY LINE, you require the following code:
infile = open('win.txt', 'r')
lines = infile.readlines()
infile.close()
outfile = open('outfile.txt', 'w')
for line in lines:
    line = line.strip() + " *\n"
    outfile.write(line)
outfile.close()

Hope that helps!

BigBadMick
bigbadmick2...@hotmail.com                                        
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to