How to Fix TypeError: list indices must be integers or slices, not ...
Traceback (most recent call last): File "<string>", line 2, in <module> TypeError: list indices must be integers or slices, not tuple. It says it on the first line of this error, that perhaps you missed a comma, and indeed we did. By defining locations without a comma, we're creating a list of lists, instead of a list of tuples.