I have a folder name as = "2545 S3C 5005 P1 5007 P2 5009 P3"
The pattern is that there would be 3 files inside this folder which would be named as:
- "2545 S3C 5005 P1"
- "2545 S3C 5007 P2"
- "2545 S3C 5009 P3"
I want to create the names of the files from the folder name and thus i want to split the name of the folder and the join that in combinations to form the file names.
The code i have tried so far is:
folder = "2545 S3C 5005 P1 5007 P2 5009 P3"
i=iter(Folder.split(' '))
File1 = map("-".join,zip(*[i]*4))
This joins in the first 4 words in the split list but I am not sure how to make the other combinations. Please help.
Thanks