title: python map a lambda function to a list
body: <p>I have the impression that the following code pattern is not good </p>
  
  <pre><code>new_data = map(lambda x: f(x, 30), data)
  </code></pre>
  
  <p>because the lambda function needs to be created <code>len(data)</code> times, thus inefficient. In that case, would the following workaround help?</p>
  
  <pre><code>g = lambda x: f(x, 30)
  new_data = map(g, data)
  </code></pre>
  
  <p>Also, would replacing the lambda function with <code>partial</code> help with speed, given data is big?</p>