title: How to use recursion to calculate the max length of a nested list?
body: <p>Here is the code that counts the maximum length in a nested list.</p>
  
  <pre><code>def max_length(obj):
      """
      Return the maximum length of obj or any of its sublists, if obj is a list.
      otherwise return 0.
  
      @param object|list obj: object to return length of
      @rtype: int
  
      &gt;&gt;&gt; max_length(17)
      0
      &gt;&gt;&gt; max_length([1, 2, 3, 17])
      4
      &gt;&gt;&gt; max_length([[1, 2, 3, 3], 4, [4, 5]])
      4
      """
      if isinstance(obj,int):
          return 0
      else:
          return max([len(x) for x in obj])
  </code></pre>
  
  <p>The code is wrong as I don't know how to correctly combine <code>len()</code> function and recursion. What should I do?</p>