#!/usr/bin/env python# coding=utf-8importtimefromfunctoolsimportreduce# 原列表nums = [1.68,37.27,14.78,12.84,15.26,4.86,10.06,25.6,8.42,20.27,6.46,29.68,6.13,18.48,4.98,7.88,4.77,8.61,5.75,4.3,7.76,3.13,11.11,5.1,2.91,3.55,6.45,55.27,8.76]# 期待求和的值expect_data =180# 对数组进行排序nu...
'b': 2}, {'a': 3, 'b': 3}, {'a': 2, 'b': 1}, {'a': 5, 'b': 0}]>>> result = [(k, [x[k] for x in rt2]) for k in rt1]>>> result[('a', [1, 3, 2,