I would rename `classes` to `class_name` and perform this operation `"not %s" % i` in the function.