how to order a list of lists by the first value,l1.sort(key=lambda x: int(x[0]))