Python小技巧 3:列表項的排序

典型代碼1:python data_list = [6, 9, 1, 3, 0, 10, 100, -100] data_list.sort() print(data_list) 輸出1: [-100, 0, 1, 3, 6, 9, 10, 100] 典型代碼2: data_list = [6, 9, 1, 3, 0, 10, 100, -100] data_list_copy = sorted(
相關文章
相關標籤/搜索