Posts by Marcio Pedro Dos Santos • 1 point
1 post
-
-2
votes2
answers38
viewsQ: I would like to know how to get the value of the amount of commutations in a list sort. without using Sorted()
s = [2, 4, 3, 1, 6, 7, 5, 8] for i in range(len(s)): for j in range(i+1,len(s)): if s[i] > s[j]: aux = s[i] s[i] = s[j] s[j] = aux …
pythonasked Marcio Pedro Dos Santos 1