【发布时间】:2026-01-06 18:20:02
【问题描述】:
此 python 代码显示此无效语法(第 16 行) pylint(syntax-error)[15,10] 此处错误显示在分号(:)
for record in colleges:
obj.writerow([record['collegeId'], record['collegeName'], record['courseType'], record['city'], record['fees'], record['pinCode']])
【问题讨论】:
-
请向我们提供一个可重现的最小示例,以便我们为您提供帮助。
-
for循环的语法错误。在末尾添加分号。 -
上一行中可能出现括号不平衡等错误。
-
所以问题现在解决了,你应该接受答案。为什么你实际上编辑了这个问题?现在没有意义了……
-
感谢@Matthias 问题解决了
标签: python visual-studio-code syntax-error pylint opencsv