Skip to content

Instantly share code, notes, and snippets.

@daniel-schroeder-dev
Last active July 2, 2022 20:06
Show Gist options
  • Save daniel-schroeder-dev/a974892e8b8af76aa0b11a5874b3b0a5 to your computer and use it in GitHub Desktop.
Save daniel-schroeder-dev/a974892e8b8af76aa0b11a5874b3b0a5 to your computer and use it in GitHub Desktop.
P12 - Lesson 12 - Exercise 4 - Step 2
...
def save_search_results(search_term, artworks, books, articles, username):
...
search_results[username][search_term] = {
...
}
# Open the search-results.json file in write mode
with open(___, mode=___) as json_file:
# Save the search_results to the search-results.json file
# Make sure to format the saved data so it is easily readable
dump(search_results, json_file, indent=___)
# REMOVE THIS!
# print(search_results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment