Write a function to sort a list


Topic: Write a function to sort a list

Solution

raw_list = [-5, -23, 5, 0, 23, -6, 23, 67]
sorted_list = []
while raw_list:
    minimum = raw_list[0]   
    for x in raw_list: 
        if x < minimum:
            minimum = x
    sorted_list.append(minimum)
    raw_list.remove(minimum)    
print(soreted_list)



List all Python Programs