please use a for loop. It is more ideomatic in python, this is no functional programming language and python has no tail recursion optimization.