title: Counting depth or the deepest level a nested list goes to
body: <p>A have a real problem (and a headache) with an assignment...</p>
  
  <p>I'm in an introductory programming class, and I have to write a function that, given a list, will return the "maximum" depth it goes to...
  For example: [1,2,3] will return 1,  [1,[2,3]] will return 2...</p>
  
  <p>I've written this piece of code (it's the best I could get T_T)</p>
  
  <pre><code>def flat(l):
      count=0
      for item in l:
          if isinstance(item,list):
              count+= flat(item)
      return count+1
  </code></pre>
  
  <p>However, It obviously doens't work like it should, because if there are lists that do not count for the maximum deepness, it still raises the counter...</p>
  
  <p>For example: when I use the function with [1,2,[3,4],5,[6],7] it should return 2, but it returns 3...</p>
  
  <p>Any ideas or help would be greatly appreciated ^^ thanks a lot!! I've been strugling with this for weeks now...</p>