标签:print code sort for ret count 选择 python pre
def sort(arr):
count = len(arr)
for i in range(count):
max = arr[i]
for j in range(count-i):
if max < arr[i+j]:
max, arr[i+j] = arr[i+j], max
arr[i] = max
return arr
l = [5, 2, 7, 8, 6, 1, 4, 9, 10, 1, 2, 3, 4]
print(sort(l))
标签:print code sort for ret count 选择 python pre
原文地址:https://blog.51cto.com/870084/2443899