title: creating file and folder loop
body: <p>Hey there I tried making a loop for creating folders and files. 
  According to me the program should work like this :</p>
  
  <ol>
  <li>create 1st folder and 1 file inside it.</li>
  <li>create 2nd folder and 1 file inside it</li>
  </ol>
  
  <p>and it goes on.....
  What my program does is :</p>
  
  <ol>
  <li>create 1 file</li>
  <li>create folders</li>
  </ol>
  
  <p>my program </p>
  
  <pre><code>import os,sys
  
  di=("ab")
  a=0
  i=0
  fi=open("az.txt","w")
  
  def file():
      for i in range(0,10):
          fi.write(str(i))
  
  def mk():
      for a in range(0,10):
          os.mkdir(di+str(a))
          file()
  
  mk()
  </code></pre>
  
  <p>please help</p>