When I try to call the `max()` function on a list which contains a combination of integers and strings, it always returns a string, in Python 2.x

For example,

```
#input
li = [2, 232322, 78, 'python', 77]
max(li)

#output
'python'

```

What seems to be the logic behind this? How does Python compare a string with an integer?