title: Create Folder Hierachy
body: <p>I am currently learning the basics of Python. At the moment, I am trying to write a script which creates folders (1st hierarchy) from a text file list, each with the the same subfolder structure which goes down to 3 hierarchies.</p>
  
  <p>I've managed to do the first part: Create the 1st hierarchy folders from a text file.</p>
  
  <pre><code>from sys import argv
  
  import os;
  home_dir = '/home/tobi/Python'
  
  mylist = open('test.txt','r')
  for folder in mylist:
  folder = folder.strip()
   newFolder = home_dir+'/'+folder
   print "Folder name " +newFolder
   if not os.path.exists(newFolder):
             os.makedirs(newFolder)
     os.chdir(newFolder)
  mylist.close()
  </code></pre>
  
  <p>Now I am struggling to create a loop to insert my given subfolder structure in each of the created folder.</p>
  
  <p>How can I do this?</p>