class Universal(object):

    def __init__(self):
        self.contents = []

def add(self, x):
    self.contents.append(x)

def remove(self, x):
    self.contents.remove(x)

def __contains__(self, x):
    return x in self.contents
How to test whether x is a member of a universal set?