<' not supported between instances of 'str' and 'int' python报错问题解决

我的问题是在字典里放K,有些事Str有些int,所以报这个错,可以是str和int不能比较,所以获取的散列值有歧义,所以不允许。

 for i,item in enumerate(i):
                if i == 25:
                    temp[str(i)] = str(item)
                else:    
                    temp[str(i)] = item

解决办法,都写成一样的

上一篇:Wireshark常用过滤方法


下一篇:在windows环境下安装pycocotools