This is a python example. We should do nice things, like using max() for finding the maximum, instead of sorting.