Read CSV Records as Dictionaries (Exercise)
00:00
Now that you have a CSV file, which includes a headline describing people’s favorite colors, it’s time to read it back to Python. You should end up with a dictionary created dynamically based on the values loaded from the file and assigned to a variable named favorite_colors
.
00:17 Once you print the variable, you should see the expected output depicted on the slide.
00:23 Before checking my solution, let’s see if you can solve this exercise on your own.
Become a Member to join the conversation.