You can use sorted
function like this
for item in sorted(shortLifeItems):
...
It compares each and every item in the list and returns the items in the sorted order. When it compares the nested lists like this, it first compares the first element of both the items and if they are equal then the second and if they are equal, then the third and goes on till the end.
You can read more about how various sequences are compared in Python, here