while creatures: c = get_random_creature() if c.is_dead(): creatures.pop(c) else: creatures.add(c.mutate())
Critiquing my own code, though, it should really be a check against 'can_reproduce()' rather than 'is_dead()'.