gcordova at hebmex.com
Mon Jun 3 19:57:51 CEST 2002
> I like to create a list of file automatical based on series.
> For example
> user input the number of file say 5. So i want to generate the file
> according to this range , this mean the generated files could be
> I using the for loop like that
> for file in range(5):
> lis = [file]
> how can it didn't work. I am confusing how to do it.
Yeah, but where do you wanna put your results?
You could also:
FNs = ["filename%d" % i for i in range(5)]
or also you could:
FNs = map(lambda i:"filename%d" % i, range(5))
or many other variations thereof.
More information about the Python-list