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
You can also use the print function if you're on python3 as follows.
f = open("myfile.txt","wb") print(mylist, file=f)