I am looking for a way to create new folders within multiple existing folders. For example I have folders a,b,c.. etc and I want to create a new folder inside each of these existing folders and name the new folders a1,b1,c1,.. etc. using a python script.
解决方案
Try looping through your list of folders rather than passing in the list. It is not the cleanest method out there but you can do something like:
parents = [p1, p2, p3]
childern = [c1, c2, c3]
for p in parents:
for c in children:
os.mkdir(os.path.join(p,c))