擅长:python、mysql、java
<p>从<strong><a href="https://github.com/Suor/funcy">funcy</a></strong>模块(<a href="https://github.com/Suor/funcy">https://github.com/Suor/funcy</a>)中,您可以选择<strong>提取</strong>函数。</p>
<p>在这种情况下,如果在主机上可以使用funcy,则以下代码应按预期工作:</p>
<pre><code>from funcy import pluck
users = [{
"name" : "Bemmu",
"uid" : "297200003"
},
{
"name" : "Zuck",
"uid" : "4"
}]
uids = pluck("uid", users)
</code></pre>
<p>注意参数的顺序不同于下划线.js使用的顺序</p>