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:
[
>>> l = [[1,1.0345],[2,5.098],[3,4.89],[2,5.97]] >>> l.sort(key=lambda x: x[1]) >>> l [[1, 1.0345], [3, 4.8899999999999997], [2, 5.0979999999999999], [2, 5.9699999999999998]]