3 class grab_bag(object):
11 if item not in self.contents:
12 self.contents.add(item)
14 def add_all(self, collection):
18 def subset(self, count):
19 if len(self.contents) < count:
21 subset = random.sample(self.contents, count)
25 return len(self.contents)
28 #x.add_all([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])