Mutable Default Argument Returns None
<p>I have a simple code that finds paths using a graph stored in a dictionary. The code is exactly:</p>

<pre><code>def find_path(dct, init, depth, path=[]):
   if depth == 0:
      return path
   next_ = dct[init]
   depth-=1
   find_path(dct, next_, depth)
</code></pre>

<p>If I print the path right before <code>return path</code> it prints to screen the correct path (after an initial depth of <code>5</code>). However, the value returned is <code>None</code>. I don't know what's going on! </p>

<p><strong>Why would the value of <code>path</code> right above the <code>return</code> is correct, yet the returned path is not what I want?</strong></p>
