For Mathematics, trees are more useful than strings. Professor Thorsten Altenkirch takes us through a functional approach to coding them in Python.