title: IndexError in Python3
body: <p>I have the following MWE:</p>
  
  <pre><code>def get_files():
      file_list = ['first', 'second', 'third', 'fourth']
      return file_list
  
  def set_names(orig_flist):
      file_list = []
      for i in range(len(orig_flist)):
          file_list[i] = orig_flist[i]
      return file_list
  
  set_names(get_files())
  </code></pre>
  
  <p>When I run it, I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "privpub.py", line 11, in &lt;module&gt;
      set_names(get_files())
    File "privpub.py", line 8, in set_names
      file_list[i] = orig_flist[i]
  IndexError: list assignment index out of range
  </code></pre>
  
  <p>I don't understand what's going on. Can somebody explain me, please?</p>