Answers for "create a list of word from text file in python"

1

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 + "n")
f.close()
Posted by: Guest on May-28-2021

Code answers related to "create a list of word from text file in python"

Python Answers by Framework

Browse Popular Code Answers by Language