title: convert python 2.7 syntax to 3.3 - sum(map(len,P))
body: <p>I have a program that works with Python 2.7 but not python 3.3 Of course I know I need to use range rather than xrange, add () for print etc.. but the program has a lot of the 'map' method and it seems to create problems. When I got this error: <code>TypeError: object of type 'map' has no len()</code> I just casted it as a string and it worked. </p>
  
  <p>What I couldn't figure out <strong>how to convert</strong> was this expression:
  <code>sum(map(len,P))</code>
  I get this error: <code>TypeError: object of type 'map' has no len()</code>
  but this time I'm not sure what to cast and how. 
  I can post the entire code if that'd help.</p>
  
  <p>This is how P is being initialized:</p>
  
  <pre><code>P, Q = [line.strip().lstrip('(').rstrip(')').split(')(') for line in input_data.readlines()]
  P = [map(int, perm_cycle.split()) for perm_cycle in P]
  </code></pre>