Opening Multiple files at one time

subhabrata.banerji at subhabrata.banerji at
Mon Apr 20 13:59:59 CEST 2015

Dear Group,

I am trying to open multiple files at one time. 
I am trying to do it as,

 for item in  [ "one", "two", "three" ]:
       f = open (item + "world.txt", "w")

This is fine. But I was looking if I do not know the number of
text files I would create beforehand, so not trying xrange option

And if in every run of the code if the name of the text files have
to created on its own. 

Is there a solution for this? 

If anybody may please suggest. 

Subhabrata Banerjee. 

More information about the Python-list mailing list