Is this the cleanest way to write a list to a file, since writelines()
doesn't insert newline characters?
(这是将列表写入文件的最干净的方法,因为writelines()
不会插入换行符吗?)
file.writelines(["%s
" % item for item in list])
It seems like there would be a standard way...
(似乎会有一种标准的方法...)
ask by Josh Arenberg translate from so