I want to create text files(empty) depending upon the user input, suppose if the user enter 20 , then it should create 1.txt,2.txt to 20.txt
Assuming i want to create 2o files, then i wrote the foll code:
for i in range(20)
filename="i.txt"
fp=open('filename','w')
fp.close()
but i know that there's an error in 2nd line(cannot combine interger(i) and string(.txt) while assigning it to filename, so i wanted to know any other way to cretae files in the above mentioned way.