title: creating directories from for loop
body: <p>I need to create directories from for loop.  I have a list.</p>
  
  <pre><code>a = [banana 1234, apple 456, orange 789]
  </code></pre>
  
  <p>And I need to create folders named by the numbers that are ending with numbers in list. for example. </p>
  
  <pre><code>C:\folder\1234; C:\folder\456
  </code></pre>
  
  <p>and so on. </p>
  
  <p>code is </p>
  
  <pre><code>for length in atrinkta:
  folder = re.findall(r'\d{9,}', length)
  os.makedirs("D:/python_study/images/skelbimai/" + folder)
  </code></pre>
  
  <p>but I get an error <strong>"TypeError: cannot concatenate 'str' and 'list' objects"</strong> don't know what to do. Please someone help.</p>
  
  <p><strong>EDIT</strong>
  I tried your method 2nd time. After deleting created folder for whatever reason python gives me error</p>
  
  <pre><code>WindowsError: [Error 183] Cannot create a file when that file already exists: 'D:/python_study/images/skelbimai/'
  </code></pre>
  
  <p><strong>2ndEdit</strong></p>
  
  <p>shaktimaan, now i get other error <strong>AttributeError: 'NoneType' object has no attribute 'group'</strong>. What does this mean?</p>