D
Dave Angel
Oops. Forgot the newline.
print will add in the space and newline, just as it does to
sys.stdout.
In python 2.x,
Instead of
f.write (a + " " + b) f.write (a + " " + b + "\n")
you can use
print >> f, a, b
print will add in the space and newline, just as it does to
sys.stdout.