这是选择排序的代码,但它不打印排序列表。我该如何展示它?
badlist = input("Enter list: ")
def select(badlist):
l = list[:]
sorted = []
while len(l):
lowest == l[0]
for x in l:
if x < lowest:
lowest = x
sorted.append(lowest)
l.remove(lowest)
return sorted
select(badlist)