gpt4 book ai didi

python - python 中的 "Expected::"错误

转载 作者:太空宇宙 更新时间:2023-11-04 07:02:40 25 4
gpt4 key购买 nike

开始学习python,如果这是初级的,很抱歉。为什么错误“Expected::”调用此代码:

cur.execute('''SELECT error FROM WT_enercon_bawnmore WHERE error <> 0;''')
count = 0
for key in d:
for i in cur:
if key = i:
count += 1
d[key] = count

Eclipse提示第五行是问题的路由。提前致谢。

最佳答案

你需要写:

if key == i:

既然你检查了它,而不是分配它。

关于python - python 中的 "Expected::"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14238721/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com