I will try to provide example for the question.
Let's say we have 3 lists. e.g :-
list1 =['one','two','three']
list2=['a','b','c']
list3=['mike','jack','ram']
Or, say there are list values for each lines in the file.
['one','two','three']
['a','b','c']
['mike','jack','ram']
Now I want to write the three lists to three different files by creating them. The names of the files should be autogenerated e.g:-
file001.txt
file002.txt
file003.txt