Answers for "file into text list"

1

list to text file python

with open('your_file.txt', 'w') as f:
    for item in my_list:
        f.write("%sn" % item)
Posted by: Guest on January-05-2021
0

convert text file into list

crimefile = open(fileName, 'r')
yourResult = [line.split(',') for line in crimefile.readlines()]
Posted by: Guest on May-25-2021

Code answers related to "file into text list"

Python Answers by Framework

Browse Popular Code Answers by Language