I have list of tuple values. I need to sort value by id from the tuple list. Can anyone help me to do this.
l = [('abc','23'),('ghi','11'),('sugan','12'),('shankar','10')]
I need a output like this.
l = [('shankar','10'),('ghi','11'),('sugan','12'),('abc','23')]
and also if i need to sort like this means
l = [('abc', '23'),('sugan', '12'),('ghi', '11'),('shankar', '10')]