我正在比较两个我知道相等的变量,但是比较结束后发现不等于1:
asearchid=searchid.get()
asearchid=IntVar()
found = 0
with open ('competitordetails.txt','rU') as csvfile:
reader = csv.reader(csvfile)
for row in reader:
compidfound = row[0]
compidfound = IntVar()
if(asearchid == compidfound):
found = 1
else:
found = 0
print(found)
我将两个变量更改为IntVar,但仍无法正常工作