
By using rec_max(L) inside its own body, this is the recursion. This makes the code be very simple. Moreover, the recursion must have a base part, in this function, is the else x for x in L. If a recursion does not have this part, the recursion will never end.
Recursion is hard to understand and apply. However, there is no doubt that the recursion is very powerful to make the program simpler, and especially on some big programs.