data_list = ['中场', '后卫', '前锋', '守门员', '主教练', '助理教练'] sort_dic = {'守门员': 1, '前锋': 2, '中场': 3, '后卫': 4, '主教练': 0} sorted(data_list, key=lambda x:sort_dic.get(x, 999)) # 倒序 sorted(data_list, key=lambda x:-sort_dic.get(x, 999))