Is this the cleanest way to write a list to a file, since writelines() doesn\'t insert newline characters?
writelines()
file.writelines([\"%s\\n\" % item fo
Let avg be the list, then:
In [29]: a = n.array((avg)) In [31]: a.tofile('avgpoints.dat',sep='\n',dtype = '%f')
You can use %e or %s depending on your requirement.
%e
%s