Check this out, please tell me what I can do to make it work. I get an obvious error here stating that I cannot change the set while I'm iterating it. I think what I'm trying to do is clear here but I have struggled on this long enough and am seeking guidance.
class SetOfSets(set):
    def __init__(self,setofsets):
        """
        initialize with family of sets
        """
        set.__init__(self,list(setofsets))
    def remove(self,element):
        """
        remove all sets from set with element in it
        """
        for inset in self:
            if element in inset:
                self.remove(element)