string generator

Gold Fish occeanlinux at linuxmail.org
Sun Jun 2 16:35:20 EDT 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 
filename1
filename2
filename3
filename4
filename5
I using the for loop like that

for file in range(5):
        lis = [file]
        string.join('filename',lis[1:])
how can it didn't work. I am confusing how to do it.




More information about the Python-list mailing list