Everything seems right about this code to me, and I tested it in an outside Python editor with no problem. I'm getting an 'expected index value, got float' when there are clearly no floats involved. Type hint is set to 'int' as shown in the image. This seems like a bug, or am I missing something?