#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Order of statements in the stack matters. Note, this string defaulted-tab trick is handy! This program counts from 4, with tabs """ def order_matters(n: int, indent: str = " ") -> None: print("\n", indent, " Next call starts here", sep="") print(indent, "Before the recursive call, n is", n) if n > 0: print(indent, "calling with ", n + 1) order_matters(n - 1, indent + " ") print(indent, "After the recursive call, n is ", n, "\n") print(indent, "Function call ends here") order_matters(4)