I wrote the code for the count_people function and I think it is

working.

I used the list rules to count the number of dictionaries in the list.
This commit is contained in:
root 2024-10-13 20:51:11 -04:00
parent 39500b0cba
commit 077aa7070a
1 changed files with 5 additions and 1 deletions

View File

@ -17,7 +17,11 @@ def count_people(people):
>>> count_people(friends)
10
"""
raise NotImplementedError()
count = 0
for person in people:
count = count + 1
return count
def get_email(people, name):
"""Returns the named person's email address. If there is no such person, returns None.