marbles = (BlackMarble() for _ in range(random.randint(0, 10))) all(isinstance(m, BlackMarble) for m in marbles)