擅长:python、mysql、java
<p>在这里使用<a href="http://docs.python.org/3/library/itertools.html#itertools.islice">^{<cd1>}</a>是有效的,因为为了订阅,我们不必创建任何中间列表。</p>
<pre><code>from itertools import islice
print(next(islice(ordered_dict.items(), 2, None)))
</code></pre>
<p>如果你只想要价值,你可以</p>
<pre><code>print ordered_dict[next(islice(ordered_dict, 2, None))]
</code></pre>