In [1]:
import itertools

In [2]:
sum_value = 0

for i in itertools.repeat(10):
    print(i)
    sum_value += i
    if sum_value > 40:
        break


10
10
10
10
10

In [3]:
for i in itertools.repeat(10, 3):
    print(i)


10
10
10

In [4]:
for l in itertools.repeat([0, 1, 2], 3):
    print(l)


[0, 1, 2]
[0, 1, 2]
[0, 1, 2]

In [5]:
for func in itertools.repeat(len, 3):
    print(func('abc'))


3
3
3

In [6]:
l = [0, 1, 2, 3]

In [7]:
print(list(zip(itertools.repeat(10), l)))


[(10, 0), (10, 1), (10, 2), (10, 3)]