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
Using numpy.savetxt is also an option:
numpy.savetxt
import numpy as np np.savetxt('list.txt', list, delimiter="\n", fmt="%s")