title: Why can't I find `len(list)` in Python?
body: <p>I'm new to Python.  I have a method that begins:</p>
  
  <pre><code>def foo(self, list):
      length = len(list)
  </code></pre>
  
  <p>I've called <code>len()</code> successfully in other cases, but here I get:</p>
  
  <pre><code>TypeError: object of type 'type' has no len()
  </code></pre>
  
  <p>How do I convince Python that this object passed in is a list?  What am I missing?</p>