Location of match or -1 if not found
(seq, k)
| 238 | return -1 |
| 239 | |
| 240 | def slow_index(seq, k): |
| 241 | 'Location of match or -1 if not found' |
| 242 | for i, item in enumerate(seq): |
| 243 | if item == k: |
| 244 | return i |
| 245 | return -1 |
| 246 | |
| 247 | def slow_find(seq, k): |
| 248 | 'First item with a key equal to k. -1 if not found' |