Last active
January 10, 2021 20:18
-
-
Save Galina-Blokh/57d286e0ea8307f4cd1d99bfcffcca6c to your computer and use it in GitHub Desktop.
Using list comprehension to extract text data from a parsed response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ingredients_list = [item.text for item in recipe_ingredients_lines] | |
instructions_list = [paragraph.text for paragraph in recipe_instructions_lines] | |
json_file['Recipe'].append(ingredients_list) | |
json_file['INSTRUCTIONS'].append(instructions_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment