Selection sort code, python…what is wrong with this code??? I get an error: list index out of range

前端 未结 0 1560
情歌与酒
情歌与酒 2021-02-04 18:57

def selection_sort(list): new_list = [] for each in list: max = list[each] for every in list: if list[every] > max: max = list[every] new_list.append(max) list.remove(max) re

相关标签:
回答
  • 消灭零回复
提交回复
热议问题