摘要: python中列表排序,字典排序,列表中的字典排序 import operator 一. 按字典值排序(默认为升序) x = {1:2, 3:4, 4:3, 2:1, 0:0} 1. sorted_x = sorted(x.iteritems(), key=operator.itemgetter(1 阅读全文
posted @ 2020-12-02 09:49 余人。 阅读(261) 评论(0) 推荐(0) 编辑