title: how to map over a function with multiple arguments in python
body: <p>I'm looking to map over a function with lists for specific arguments. </p>
  
  <pre><code>def add(x, y):
      return(x + y)
  
  list1 = [1, 2, 3]
  list2 = [3, 4, 5]
  </code></pre>
  
  <p>After some research I have been able to successfully do it using <code>map</code> and a <code>lambda</code> function.</p>
  
  <pre><code>list(map(lambda x, y: add(x, y), list1, list2))
  </code></pre>
  
  <p>I was wondering, is it better to do this using an iterator? I tried the following but couldn't figure it out:</p>
  
  <pre><code>[add(x, y), for x, y in list1, list2]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>[add(x, y), for x in list1 for y in list2]
  </code></pre>
  
  <p>Thanks in advance!</p>