There is a list named 'links' and I want to write as many files as the number of links inside this list (I'm doing web scraping). For example if the list contains 100 links, I would like to write data of each link to a separate text file like '1.txt','2.txt','3.txt'.... .
How can I achieve this type of auto file naming in python?