Decide if 4 lengths form a square, rectangle or neither
Why do we need a set to find a square?
Why is a square not a subset of rectangle?
You can do the any check in the gon[0] == gon[2].
Why no filter on length of gon? Pentagons aren't squares...
gon is a poor name... do you mean polygon?
I agree with holroy, -5 makes sense, but 0 does not.


So I would do:

for shape in tgons:
    if shape[0] == shape[2] &gt; 0 and shape[1] == shape[3] &gt; 0 and len(shape) == 4:
        if shape[0] == shape[1]:
            squares += 1
        else:
            rects += 1
    else:
        neithers += 1


This can also be changed to allow all 2D rects/squares. (not lines.)

if shape[0] == shape[2] != 0 and shape[1] == shape[3] != 0 and len(shape) == 4:




Also follow PEP8 a bit more, as then you'll have easier to read code.
You mostly need more spaces:


Before and after infix operators.
After but not before commas.