Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python write list to text file

a_list = ["abc", "def", "ghi"]
f = open("a_file.txt", "w")
for item in a_list:
   f.write(item + "
")
f.close()
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #python #write #list #text #file
ADD COMMENT
Topic
Name
6+7 =