title: Map List into Tuples?
body: <p>I'm trying to map a list of lines into tuples with line number and line length. My instructions require me to use the map, filter, and reduce functionalities in Python.</p>
  
  <p>So far I've got filter, which is here.</p>
  
  <pre><code>def code_metric(file):
      x = filter(lambda x : x != "\n", open(file))
      y = map(lambda x: )
  </code></pre>
  
  <p>Sample of how it should look like ...</p>
  
  <p>(1, # of chars in line)</p>
  
  <p>I'm having trouble mapping the list into line numbers and line length using the map function. </p>