我现在被这个错误卡住了,我没有在Google上找到(我理解的)解决方案: TypeError: list indices must be integers or slices, not tuple 我试着这样做val2 = values[x][1]
writer.writerow([val1,val2,val3]) values是一个嵌套列表每个嵌套列表都有相同的长度。 我理解这个错误,但我不明白
嗨,我试图循环这个列表,并访问嵌套字典中的一个特定值。[{'customer': {'name': 'Karl'}}, {'customer': {'name': 'Smith'}}][d for d in Account.accountListif d['customer']['name'] == '