Python Range Stack Overflow Error On Recursion In Javascript W3schools