You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
surnames = [laureate['surname'] for laureate in sorted_laureates]
153
+
154
+
# concatenate surnames separated with " and "
155
+
all_names =" and ".join(surnames)
156
+
157
+
return all_names
158
+
159
+
# test the function on a sample doc
160
+
print(all_laureates(sample_prize))
161
+
```
162
+
-[x]2. Find the documents for the prizes in the physics category, sort them in chronological order (by "year", ascending), and only fetch the "year", "laureates.firstname", and "laureates.surname" fields.
163
+
```py
164
+
# find physics prizes, project year and first and last name, and sort by year
-[x]3. Now that you have the prizes, and the function to extract laureates from a prize, print the year and the names of the laureates (use your all_laureates() function) for each prize document.
171
+
```py
172
+
# print the year and laureate names (from all_laureates)
0 commit comments