所以我在一个列表类中有这个信息块。每当我执行 print(block) 时,它都会遍历整个列表并输出以下内容:'从' 3,:[{ '版本' 'hx7ccc54932b913c71f7051e9dc1b621074c91d462', '到': 'hxbf2a3504318b6315e38eeb87ee84402361a7d644', 'stepLimit':1000000, '时间戳':1547599428802897 'NID':1, '值':30000000000000000000000“签名': 'ehslHJOj5e6apGhxEbZ6SESx5fagazIPNI5BjCo3sMYAGWVMQbiN8w/PH8BHhHmXBtwEGWiqEuTU5fa4toeOvwE=', 'txHash': '0x833bf60c78c82d3bc4b3dca3bc4bc2f9dc2f9dc2f9dc2f9dc2f2d我试图做 print(block[1]) 和 print(block[0][1]) 但它说超出范围?from iconsdk.icon_service import IconServicefrom iconsdk.providers.http_provider import HTTPProviderdef main(): icon_service = IconService(HTTPProvider("https://ctz.solidwallet.io/api/v3")) block = icon_service.get_block("latest")['confirmed_transaction_list'] print(block)if __name__ == '__main__': main()我希望它给我 'to' (hxbf2a3504318b6315e38eeb87ee84402361a7d644) 的结果,而不是循环遍历整个块,即使我从未告诉程序这样做。
添加回答
举报
0/150
提交
取消