Tri Recursion In Python Explained