I have a list of lists (can\'t be tuples since I have to generate it dynamically) and it is structured as a list of lists of one int and one float Like so:
[
How about using they key parameter of sorted...
sorted_list = sorted([[1,1.0345],[3,4.89],[2,5.098],[2,5.97]], key=lambda x: x[1])
This tells python to sort the list of lists using the item at index 1 of each list as the key for the compare.