1.冒泡排序 a = [25,15,47,36,44,455,67,234,7,8,-47] def sortport(): for i in range(len(a)-1): for j in range (len(a)-1-i): if a[j]>a[j+1]: a[j],a[j+1] = a[j+1],a[j] return a if __name__ == '__main__': sortport() print(a) 输出 [-47, 7, 8, 15, 25, 36, 44, 47,…