{'indexdelaymarket': [{'contractname': 'cu2305', 'lastprice': '66890', 'upperdown': '200', 'openinterest': '145777', 'volume': '69188'},python获取单个数据
时间: 2023-05-11 19:07:18 浏览: 63
可以使用Python的字典和列表索引来获取单个数据,例如:
data = {'indexdelaymarket': [{'contractname': 'cu2305', 'lastprice': '66890', 'upperdown': '200', 'openinterest': '145777', 'volume': '69188'}]}
last_price = data['indexdelaymarket'][0]['lastprice']
print(last_price)
这将输出:66890
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)