title: How to recursively append to an empty list?
body: <p>I'm new to recursion and finding it pretty difficult to grasp. I can't figure out how to append an empty array if I can't directly &quot;touch&quot; it. If its a string I would add the value each time. If it was a number that involved multiplication, I could multiply it each time, but with an array, I don't know what to do.</p>
  <p>I dont know how to append to an empty array without being able to directly &quot;touch&quot; it.</p>
  <p>This is what I've done so far:</p>
  <pre><code>def laugh(num):
    if num == 0:
      return []
    # This doesnt work since we can't append a function call. I'm unsure what to do.
    return laugh(num - 1).append(&quot;ha &quot;)
  </code></pre>
  <h1>print(laugh(3)) -&gt; [&quot;ha, ha, ha&quot;]</h1>
  <p>If could do this easily if i could just return a string of &quot;Ha&quot;'s instead. I could return an empty string and just add a &quot;Ha&quot; for each step.</p>