小编Mik*_*ike的帖子

根据项条件在两个列表中查找索引

可以说我有两个清单.它们是从-5到5的书籍评级列表.

我想知道list1的元素是什么时候>= 1和list2的元素== 0,例如.

list1 = [3, 3, 1, 0, 3, 0, 3, 0, 0, -3, 0, 5, 3, 0, 1, 0, 0, 5, 3, 0, 0, 0, 0, 1, 0, 3, 0, 1, 0, 0, 3, 5, 3, 3, 0, 0, 0, 5, 0, 5, 0, 3, 3, 0, -3, 0, 0, 5, 1, 5, 3, 0, 3, 0, 0]
list2 = [5, 0, 0, 0, 0, 0, 5, 0, 0, 1, 0, 5, 3, …
Run Code Online (Sandbox Code Playgroud)

python indexing list data-structures

7
推荐指数
2
解决办法
334
查看次数

标签 统计

data-structures ×1

indexing ×1

list ×1

python ×1