python - 比较两个相等的变量时,程序没有识别出它们相等>
问题描述
我正在比较两个变量,我知道它们是相等的,但是在比较结束时发现不 = 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,但它仍然无法正常工作
解决方案
推荐阅读
- r - 无法在 Rstudio 中导入数据集 Ionosphere
- flutter - 如何在颤动中按另一个集合中的字段过滤firestore数据
- java - Redisson:有没有办法为特定包中的类使用不同的编解码器而不是全局配置的编解码器?
- laravel - Laravel 6:安装 vue auth 后 npm run watch 不起作用
- python-3.x - 如何使用 Lambda 函数将日志文件从 AWS 发送到 Microsoft 团队
- c# - 如何在docker中通过使用nginx获取真实的客户端ip
- tensorflow - TypeError:看到一个对象是 EagerTensor 的严格子类的实例
- node.js - Node.JS,node-imagemagick:函数调用时参数无效/ENOENT
- mongodb - Docker Compose MongoDB docker-entrypoint-initdb.d 不工作
- kubernetes - 为什么 kubernetes 需要有 2 个 coredns pod