Answers for "txt list to python list"

0

txt to list python

with open('names.txt', 'r') as f:
    myNames = [line.strip() for line in f]
Posted by: Guest on July-11-2021
0

lista to txt python

#Salvar lista em .txt
with open('your_file.txt', 'w') as f:
    for item in my_list:
        f.write("%sn" % item)
Posted by: Guest on November-27-2020

Python Answers by Framework

Browse Popular Code Answers by Language