use a for loop to iterate over folders you want to create. Also use os.path.join to create paths
import os sub_folders = ('raw', 'right', 'left') with open('regina.txt') as x: for line in x: line = line.strip() for sub_folder in sub_folders: os.makedirs(os.path.join(line, sub_folder))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs