Skip to content

Commit

Permalink
Solution-2
Browse files Browse the repository at this point in the history
  • Loading branch information
olgashydlovska committed Sep 29, 2024
1 parent 5debff1 commit 3bf0383
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,4 @@ def bring_slippers(self) -> None:


def feed_animals(animals: list[Animal]) -> int:
total_food_points = 0
for animal in animals:
total_food_points += animal.feed()
return total_food_points
return sum(animal.feed() for animal in animals)

0 comments on commit 3bf0383

Please sign in to comment.