How can I sort a list in order? I have a list of tuples in a list and I need to sort them in order which I want.
list1 = [(2,3,4),(3,4,5),(5,3,2)]
I need to sort them firstly by the second element of tuple, secondly(if the previous were equal) by the third and thirdly by the first. Is there any built-in function to do it?