def doRep(x,n) y = [] if n == 0 return [] else y = doRep(x, n-1) y.append(x) return y print(doRep(4,5))
The output should be