Return the first index of b in a.
(a, b)
| 179 | return a[b] |
| 180 | |
| 181 | def indexOf(a, b): |
| 182 | "Return the first index of b in a." |
| 183 | for i, j in enumerate(a): |
| 184 | if j is b or j == b: |
| 185 | return i |
| 186 | else: |
| 187 | raise ValueError('sequence.index(x): x not in sequence') |
| 188 | |
| 189 | def setitem(a, b, c): |
| 190 | "Same as a[b] = c." |
searching dependent graphs…