擅长:python、mysql、java
<p>试试这个:</p>
<pre><code>sol = {"shape1":[250, 300, 280], "shape2":[46, 70, 5], "shape3":[147, 12, 150], "shape4":[107, 10, 108]}
smallest_shape = ""
smallest_value = 0
for i, pair in enumerate(sol.items()):
if i == 0 or pair[1][0] < smallest_value:
smallest_shape = pair[0]
smallest_value = pair[1][0]
print(smallest_shape)
</code></pre>