不得不说Python是最简洁的语言
arr = [ 5,4,3,2,1,7,6,9,8,10]
arr_len = len(arr)
print(f"The length of arr is : {arr_len}")
for i in range( arr_len-1):
temp = 0;
for j in range(arr_len-1-i):
if arr[j + 1] < arr[j]:
temp = arr[j + 1]
arr[j + 1] = arr[j]
arr[j] = temp
print(f"The arr in order are : {arr} " )