Message378551
The index() method is working as expected. This isn't a bug.
The easiest way to accomplish your goal is to use enumerate() with a list comprehension:
>>> po = [11,22,33,44,11,55,66,11,88]
>>> [i for i, value in enumerate(po) if value == 11]
[0, 4, 7] |
|
Date |
User |
Action |
Args |
2020-10-13 10:00:22 | rhettinger | set | recipients:
+ rhettinger, chetanpalliwal13 |
2020-10-13 10:00:22 | rhettinger | set | messageid: <1602583222.05.0.121669022776.issue42026@roundup.psfhosted.org> |
2020-10-13 10:00:22 | rhettinger | link | issue42026 messages |
2020-10-13 10:00:22 | rhettinger | create | |
|