Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to create multiple file in python using for loop.

for x in range(5):
    file = open("name%d.txt" % x, "w")
    file.write("I am name%d" % x)
    file.close()
 
PREVIOUS NEXT
Tagged: #create #multiple #file #python
ADD COMMENT
Topic
Name
9+2 =