Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

PREVIOUS NEXT
Code Example
Python :: django delete table data 
Python :: black jack python 
Python :: python find string in string 
Python :: toolbar pyqt 
Python :: threading in python 
Python :: boto3 upload dataframe directly to s3 
Python :: import statsmodels as sm 
Python :: installing intel-numpy 
Python :: datetime to timestamp 
Python :: defaultdict in python 
Python :: size pilimage 
Python :: pandas fillna by rows 
Python :: python tkinter cheat sheet 
Python :: python filter list with list of booleans 
Python :: *kwargs 
Python :: python cheat 
Python :: na.fill pyspark 
Python :: puthon for loop 
Python :: how to move the element of an array in python by one step 
Python :: pandas convert column to title case 
Python :: 4D Array To DF 
Python :: pandas df count values less than 0 
Python :: how to extract values from a dictionary 
Python :: star program in python using for loop 
Python :: split list python percent 
Python :: torch.nan_to_num 
Python :: subscriptable meaning in python 
Python :: pandas get higher value of column 
Python :: create 20 char with python 
Python :: python for loop range 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =