python - TypeError:'int'和'dict'的实例之间不支持'<='
问题描述
我得到错误:while (low <= high) and list[low] <= x <= list[high]:
TypeError: '<=' not supported between instances of 'int' and 'dict'
while low <= high and list[low] <= x <= list[high]:
critical_op += 1
if low == high:
if list[low] == x:
return low
return -1
低 = 0 高 = (项目 - 1)
解决方案
推荐阅读
- reactjs - 如何在 Flatlist 中动态设置 react-native-material-menu
- python - 如何在仅包含列表中所有值的字典中查找所有键
- python - 执行makemigrations操作时出现Django“无法添加外键约束”错误
- python - 为什么 NLTK 的 PoS 标注器对单词中的每个字母进行标记,而不是对每个单词进行标记?
- javascript - 动态下载javascript并稍后执行
- eclipse - 行尾同居终端和 Eclipse Git
- android - 写入加速度计数据
- intellij-idea - 无法将 functx 库与 intellij idea 社区版一起使用
- c++ - 如何使 Qt 主窗口相互连接?
- css - 用于 css SelectorText 的正则表达式