> It's better written as: > > if coords[0]<=posx<=coords[2] and coords[1]<=posy<=coords[3]: Hmm.... I just tried that, and am quite amazed to find that it actually works.