Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

write text in list to text file python

all_sents = ['hey there', 'how are you']
with open('file_name.txt', 'w', encoding='utf-8') as f:
   f.write('
'.join(all_sents)) 
 
PREVIOUS NEXT
Tagged: #write #text #list #text #file #python
ADD COMMENT
Topic
Name
4+2 =