def repeatfunc(func, times=None, *args):
 if (times is None):
  return starmap(func, repeat(args))
 return starmap(func, repeat(args, times))

def repeatfunc ( func , times = None , * args ) : if ( times is None ) : return starmap ( func , repeat ( args ) ) return starmap ( func , repeat ( args , times ) )
repeat calls to func with specified arguments .