Aufgabe 5 alternative Lambda Funktion implementiert
parent
1d12195402
commit
b9ee7f2538
|
@ -22,6 +22,8 @@ if __name__ == "__main__":
|
|||
|
||||
# Aufgabe 5
|
||||
list_to_sort = [[1, 2, 3], [2, 1, 3], [4, 0, 1]]
|
||||
list_to_sort.sort(key=lambda x: x[1]) # in-build-function
|
||||
|
||||
for row in range(len(list_to_sort)):
|
||||
for next_row in range(row + 1, len(list_to_sort)):
|
||||
if list_to_sort[row][1] > list_to_sort[next_row][1]:
|
||||
|
|
Loading…
Reference in New Issue