title: python insert indexerror: list index out of range
body: <p>I am now saving images in order by 1...10
  My first code was below.</p>
  
  <pre><code>save_path='/home/imagefolder'
  for i in range(1,11):
      name=i
  fullname=os.path.join(save_path,str(name)+".png")
  </code></pre>
  
  <p>But in this code, The image file is just saved only "9.png".</p>
  
  <p>So I changed the way.</p>
  
  <pre><code>name=[]
  fullname=[]
  for i in range(1,11):
      name.insert(i,i)
      fullname=os.path.join(save_path,str(name[i]+".png")
      img.save(fullname[i])
  </code></pre>
  
  <p>And now, there is a indexerror: list index out of range.</p>
  
  <p>I need help. please.</p>