我有一个包含元组的列表。每个元组拥有2个元素。我试着用下面的代码打印出来,但它给人的错误消息: TypeError: list indices must be integers or slices, not tuple 相关代码: for i in list:
for j in [1, 2]:
print(list[i][j])
随着打印1元组的每个元素的想法,每个元素第
之前声称这个问题是重复的 我发现了一个similar question posted here。我认为这是因为我正在使用python3,但我收到TypeError: unsupported operand type(s) for +: 'dict_items' and 'dict_items'和AttributeError: 'dict' object has no attribute 'iter