title: map in Python with multiple arguments, including one with a default value
body: <p>I am using Python3.6 and am trying to figure out ways in which we can use <code>map</code> with multiple arguments.</p>
  
  <p>When I run, </p>
  
  <pre><code>def multiply(x, y, z):
      return x * y * z
  
  products = map(multiply, [3,6], [1,8], [3,5])
  </code></pre>
  
  <p><code>list(products)</code> returns <code>[9, 240]</code> as expected</p>
  
  <p>However, when I specify a default value for z,</p>
  
  <pre><code>def multiply(x, y, z = [3,5]):
      return x * y * z
  
  products = map(multiply, [3,6], [1,8])
  </code></pre>
  
  <p><code>list(product)</code> returns</p>
  
  <pre><code>[[3, 5, 3, 5, 3, 5],
   [3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5,
    3,
    5]]
  </code></pre>
  
  <p>Why does Python differ in the way it runs <code>map</code> in the two scenarios?</p>