Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create a new file in python 3

To create and write to a file in python3
f = open(filename, "x+")
f = open(filename, 'w')
f.write(content)
f.close()
 
PREVIOUS NEXT
Tagged: #create #file #python
ADD COMMENT
Topic
Name
8+4 =