您可以访问具有各自索引的列表和具有各自键的字典值。
这里有一个细目以达到您想要的输出:
#Access the third element (index 2) in your initial list to get a dictionary
d = your_list[2]
#Get value for key 'tax_id' : [[6, False, [**1**]]]
tax_id_list = d['tax_id']
# Get sublist: [6, False, [**1**]]
tax_id_sub_list = tax_id_list[0]
# Get list with one in it: [**1**]
element_with_one = tax_id_sub_list[2]
#Finally, access the first element in that list: 1
print(element_with_one[0])
输出:
1
将以上所有内容合并成一行(但是,更难阅读):
print(your_list[0][2]['tax_id'][0][2][0])
输出:
一