擅长:python、mysql、java
<p>您可以创建<code>list</code>个<code>dict</code></p>
<pre><code>data = [
{
"Account number": "456",
"First Name": "Zeke",
"Last Name": "Pena",
"Savings Amount": 1200,
"Checkings Amount": 2313
},
"Account number": "456",
"First Name": "Suzie",
"Last Name": "Gonzalez",
"Savings Amount": 2001,
"Checkings Amount": 1256
}
]
</code></pre>
<p>将所有数据添加到列表中。然后使用<code>filter</code>在其中搜索</p>
<pre><code>filter(lambda x: x["Account number"] == key_input, data)
</code></pre>