zip(*sorted(zip())) 用这个玩意儿可以以对两个迭代对象进行排序. 示例代码01 cnts = [2, 4, 3, 6, 5] boundingBoxes = [(730, 20, 54, 85), (651, 20, 53, 85), (571, 20, 53, 85), (492, 20, 53, 85), (412, 20, 53, 85)] # b是zip中的一个元素,不确定是哪个,随机 (cnts, boundingBoxes) = zip(*sorted(zip…