polygon = [[1,1], [2,5], [6,8], [10,9]] if len(polygon) < 3: print "not a valid polygon" elif len(polygon) == 3: print "the polygon is a triangle" elif len(polygon) == 4: print "the polygon has four sides (and could be a square)" else: print "it's a more complex polygon"