title: Create new folders using python
body: <p>I am trying to create folders using the following code. Something is not correct and leads to error:</p>
  
  <p>"TypeError: 'str' object is not callable"</p>
  
  <pre><code>import os, sys
  
  a= [4,3,2,1]
  print len(a)
  for idx in range (len(a)):
  
      newpath = r'E:\test\tool\folder_%s'(idx) 
      if not os.path.exists(newpath): os.makedirs(newpath)
  </code></pre>
  
  <p>Using os.makedirs I can create folders. However, I am not able to suffix those folders in a loop. Any ideas can be helpful. Thanks.</p>