title: zip list with a single element
body: <p>I have a list of some elements, e.g. <code>[1, 2, 3, 4]</code> and a single object, e.g. <code>'a'</code>. I want to produce a list of tuples with the elements of the list in the first position and the single object in the second position: <code>[(1, 'a'), (2, 'a'), (3, 'a'), (4, 'a')]</code>.</p>
  
  <p>I could do it with <code>zip</code> like this:</p>
  
  <pre><code>def zip_with_scalar(l, o): # l - the list; o - the object
      return list(zip(l, [o] * len(l)))
  </code></pre>
  
  <p>However, this gives me a feeling of creating and unnecessary list of repeating element.</p>
  
  <p>Another possibility is</p>
  
  <pre><code>def zip_with_scalar(l, o):
      return [(i, o) for i in l]
  </code></pre>
  
  <p>which is very clean and pythonic indeed, but here I do the whole thing "manually". In Haskell I would do something like</p>
  
  <pre class="lang-hs prettyprint-override"><code>zipWithScalar l o = zip l $ repeat o
  </code></pre>
  
  <p>Is there any built-in function or trick, either for the zipping with scalar or for something that would enable me to use ordinary zip, i.e. sort-of infinite list?</p>