Removing a recursion in Python, part 1 | Hacker News Reader