MODERATOR EDIT: no full code please
I was inclined to try the solution provided by jeangodecoster. It's clever. I re-did it with Python 3.
Anyway, I've tried using this on all tests. The code is unable to complete tests #3 and #4. As noted through trial, when Thor's position and the Light's position both share the same Y coordinate (on test #3), by this code he should continue to move West until he hits his mark. Mind you, that Y coordinate is mutually 17, and, thus, within the bounds of LY and TY.
Anyone have any ideas as to what might be happening here?