我有一本这样的字典:
{(1007, 0, 10, 8): 0,
(1007, 5, 15, 8): 0,
(1007, 10, 20, 8): 0,
(1007, 15, 25, 8): 5,
(1007, 20, 30, 8): 5,
(1007, 25, 35, 8): 3,
(1007, 30, 40, 8): 3,
(1007, 35, 45, 8): 3,
(1007, 40, 50, 8): 3}
我想在第2个和第3个值上压缩字典。如何压缩此字典使其看起来像这样:
{(1007, 0, 20, 8): 0,
(1007, 15, 30, 8): 5,
(1007, 25, 50, 8): 3}