帮忙看看这个dict查找
Style_Dict = [ {3: 2, 6: 2, 10: 2, 15: 2, 19: 1, 22: 2, 28: 2, 32: 2},
{1: 1, 6: 1, 12: 1, 17: 2, 20: 1, 23: 1, 29: 1, 33: 1},
{4: 1, 7: 1, 10: 1, 14: 2, 23: 2, 26: 2, 30: 1, 34: 1},
{2: 1, 8: 2, 12: 2, 16: 1, 21: 2, 24: 1, 28: 1, 34: 2},
{1: 2, 4: 2, 13: 1, 16: 2, 19: 2, 25: 1, 31: 1, 36: 1},
{5: 1, 9: 2, 14: 1, 18: 1, 21: 1, 25: 2, 29: 2, 32: 1},
{2: 2, 7: 2, 11: 2, 18: 2, 22: 1, 27: 2, 33: 2, 36: 2},
{3: 1, 9: 1, 13: 2, 17: 1, 24: 2, 27: 1, 20: 2, 35: 2}
]
for style in Style_Dict:
if 1 in style:
print(True)
回答:
为什么上面这个dict查找,打印出来只有两行true?
回答:
只有第二行和第五行的key有1,两行True有什么问题?
以上是 帮忙看看这个dict查找 的全部内容, 来源链接: utcz.com/p/937799.html