我的代码:
import csv
def searchProxy():
csv_file = csv.reader(open ('C:/Users/Keanu/Documents/CSV/07-12-report.csv', 'r'))
cardIdentifier = input('Enter proxy')
for row CardIdentifier in csv_file:
if Card Identifier == row[0]:
print(row)
print ('Enter to search card identifier')
src = int(input ("Enter here: "))
我得到这个SyntaxError
:
File "C:\Users\Keanu\Documents\PythonProjects\main.py", line 8
for row CardIdentifier in csv_file:
^
SyntaxError: invalid syntax
Process finished with exit code 1
CardIdentifier
是我的 csv 文件中列的名称,我正在搜索每一行。什么可能导致错误?