diff --git a/friend_functions.py b/friend_functions.py index c4d1fe7..6037afe 100644 --- a/friend_functions.py +++ b/friend_functions.py @@ -71,7 +71,11 @@ def people_who_like_color(people, color): >>> people_who_like_color(family, "indigo") [] """ - raise NotImplementedError() + who_likes_this_color = [] + for person in people: + if color in person["favorite_colors"]: + who_likes_this_color.append(person) + return who_likes_this_color def count_people_who_like_color(people, color): """Returns the number of people who like a given color.