def repeat(l, n):
    """ Repeat all items in list n times
        repeat([1,2,3], 2) => [1,1,2,2,3,3]
        http://stackoverflow.com/questions/24225072/repeating-elements-of-a-list-n-times
    """
    return [x for x in l for i in range(n)]