list = [('ba',4), ('hh',5), ('gg', 25)]
How do I do:
list.index('hh') ...and returns 1?
Then, how do I sort it by the 25, 5, 4?
What if I have 2 lists:
list1 = [('ba',4), ('hh',5), ('gg', 25)]
list2 = [('ja',40), ('hgh',88), ('hh', 2)]
how do I do a for each?
for item in l1:
if item[0] in l2[0 of the tuple]: