def repeat_func(func, *args, **kwargs):
 if kwargs:
  return starmap((lambda args, kwargs: func(*args, **kwargs)), repeat((args, kwargs)))
 else:
  return starmap(func, repeat(args))

def repeat_func ( func , * args , ** kwargs ) : if kwargs : return starmap ( ( lambda args , kwargs : func ( * args , ** kwargs ) ) , repeat ( ( args , kwargs ) ) ) else : return starmap ( func , repeat ( args ) )
repeat_func -> iterator repeatedly calls func with positional arguments args and keyword arguments kwargs .