X 3 1 9 2 1 6 3 Hello Sort List List Lists Example List Short Way Coding Python Please He Q37039078

x = [[3,1],[9,2,1],[6,3]]

Hello, how should I do to sort each list in the list of lists,for example, the list above.

Is there any short way of coding to do this in python?

please help thank you


Solution


def bubbleSort(lst): ind = [] for i in range(len(lst)): ind.append(i) needNextPass = True k = 1 while k < len(lst) and needNextPass: # List may be sorted and next pass not needed

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.