zip() in python, how to use static values
Question: I'm trying to build an array of tuples with first value from list with some
static values.

It should be simple but I'm struggling to do this for some reason.

For example, how do I get the following:

    
    
     [(1,100,200),
      (2,100,200),
      (3,100,200),
      (4,100,200),
      (5,100,200)]
    
    >>> zip([1,2,3,4,5],100,200)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: zip argument #2 must support iteration
    


Answer: You could use
[`itertools.repeat`](https://docs.python.org/2/library/itertools.html#itertools.repeat)
to repeat the elements that you're trying to zip together.

    
    
    >>> import itertools
    >>> zip([1, 2, 3, 4, 5], itertools.repeat(100), itertools.repeat(200))
    [(1, 100, 200), (2, 100, 200), (3, 100, 200), (4, 100, 200), (5, 100, 200)]
    

You could also specify the number of times you need to repeat the element. (5
in this case)

