题目:
选择排序法,对10个数进行排序。
def dsort(list_num):
for i in range(len(list_num)):
for j in range(i,len(list_num)):
if list_num[i] > list_num[j]:
list_num[i],list_num[j] = list_num[j],list_num[i]
return list_num
i = dsort([25,48,95,32])
原文地址:https://www.cnblogs.com/lovely-bones/p/11635807.html
时间: 2024-11-04 21:17:28