DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python write list to file
data = [1,2,3,4,5] with open('myfile.txt', 'w') as f: f.writelines([f"{x} " for x in data])
Source by stackabuse.com #
PREVIOUS
NEXT
Tagged:
#python
#write
#list
#file
ADD COMMENT
Topic
COMMENT
Name
4+1 =
Submit