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
In python>3 you can use print and * for argument unpacking:
print
*
with open("fout.txt", "w") as fout: print(*my_list, sep="\n", file=fout)