title: Why does this iterative list-growing code give IndexError: list assignment index out of range? How can I repeatedly add elements to a list?
body: <p>I tried writing some code like:</p>
  <pre><code>i = [1, 2, 3, 5, 8, 13]
  j = []
  k = 0
  
  for l in i:
      j[k] = l
      k += 1
  </code></pre>
  <p>But I get an error message that says <code>IndexError: list assignment index out of range</code>, referring to the <code>j[k] = l</code> line of code. Why does this occur? How can I fix it?</p>