human
Sort a list by multiple attributes?
assistant
Here is some code to sort a list `s` by first and second attributes

s = sorted(s, key=lambda x: (x[1], x[2]))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.