回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>我期待着拉“高”从下面所有3个名单。我不知道该怎么办。你知道吗</p>
<pre><code>[
{
'timestamp':'2019-04-09T23:41:00.000Z',
'symbol':'XBTUSD',
'open':5189.5,
'high':5190,
'low':5189,
'close':5190,
'trades':14,
'volume':1246,
'vwap':5189.4136,
'lastSize':480,
'turnover':24010476,
'homeNotional':0.24010476,
'foreignNotional':1246
},
{
'timestamp':'2019-04-09T23:40:00.000Z',
'symbol':'XBTUSD',
'open':5190,
'high':5190,
'low':5189.5,
'close':5189.5,
'trades':4,
'volume':540,
'vwap':5189.9523,
'lastSize':20,
'turnover':10404800,
'homeNotional':0.104048,
'foreignNotional':540
},
{
'timestamp':'2019-04-09T23:39:00.000Z',
'symbol':'XBTUSD',
'open':5197.5,
'high':5195.5,
'low':5187,
'close':5190,
'trades':56,
'volume':24286,
'vwap':5189.6829,
'lastSize':1058,
'turnover':467970327,
'homeNotional':4.67970327,
'foreignNotional':24286
}
]
</code></pre>
<p>我试着简单地使用<code>high = [0:]["high"]</code>——但结果是</p>
<pre><code> TypeError: list indices must be integers or slices, not str
</code></pre>
<p>从每个列表中选择3个“高”是什么合适的命令?对于这个实例,它应该返回<code>5190, 5190, 5195.5</code>。你知道吗</p>