Sorting lists, tuples and objects