title: Recursively traverse a list in python
body: <p>In a learning exercise we were asked to traverse a multi-dimensional list and print all of its values in a single function/for loop.</p>
  
  <p>My brain got stuck on the basics of how a recursive function should work, through some online examples I came up with what I tought was the answer, but it stops at the first list with values it finds.</p>
  
  <p>What was the mistake of my train of tought here?</p>
  
  <pre><code>def walk(l):
      for v in l:
          if type(v) is list:
              return walk(v)
          else:
              print(v)
  
  l = [
  
      [1,2,3],
      [4,5,6],
      [7,8,9]
  ]
  
  walk(l)
  
  &gt;&gt;1
  &gt;&gt;2
  &gt;&gt;3
  </code></pre>