Make an iterator that returns object over and over again. Runs indefinitely unless the times argument is specified.
itertools.repeat(object[, times])
def repeat(object, times=None):
repeat(10, 3) --> 10 10 10
if times is None:
while True:
yield object
else:
for i in range(times):
yield object
>>> list(map(pow, range(10), repeat(2)))
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]