diff --git a/cellular_automata/wa_tor.py b/cellular_automata/wa_tor.py index 2a9161201..528ce35eb 100644 --- a/cellular_automata/wa_tor.py +++ b/cellular_automata/wa_tor.py @@ -178,11 +178,7 @@ class WaTor: >>> len(wt.get_entities()) == PREDATOR_INITIAL_COUNT + PREY_INITIAL_COUNT True """ - return [entity - for column in self.planet - for entity in column - if entity - ] + return [entity for column in self.planet for entity in column if entity] def balance_predators_and_prey(self) -> None: """