Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python write list to file with newlines

with open('/path/to/filename.txt', mode='wt', encoding='utf-8') as myfile:
    myfile.write('
'.join(lines))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #write #list #file #newlines
ADD COMMENT
Topic
Name
7+5 =