for i in range(3): locals()["group"+str(i)] = self.getGroup(selected, header+i)
for i in group(3): setattr(self, "group"+str(i), self.getGroup(selected, header+i)