摘要: 主要是sorted对list(包含元素值是tuple)、字典排序,因为sorted是内置函数,所以不需要导入包 if __name__ == "__main__": a = [5, 7, 6, 3, 4, 1, 2] b = sorted(a) # [5, 7, 6, 3, 4, 1, 2] a = 阅读全文
posted @ 2021-09-02 20:31 suwenyuan 阅读(114) 评论(0) 推荐(0) 编辑