1viktors_ingredients = ["чушки", "домати", "моркови", "ябълки", "сол",
2 "черен пипер", "кимион", "зехтин"]
3
4georgis_ingredients = ("чушки", "домати", "патладжан", "люти чушки", "олио",
5 "захар", "чубрица", "черен пипер", "врачанска ракия")
6
7shopping_list = viktors_ingredients + list(georgis_ingredients)
8shopping_list.reverse()
9
10unique_ingredients = set(shopping_list)
11
12ingredient_quantities = dict.fromkeys(unique_ingredients, 5)
13ingredient_quantities["skyr"] = 1
14
15number_of_ingredients_to_buy = len(ingredient_quantities)
........
----------------------------------------------------------------------
Ran 8 tests in 0.000s
OK
| f | 1 | f | 1 | ||
| t | 2 | viktors_ingredients = ["чушки", "домати", "моркови", "ябълки", "сол", "черен пипер", "кимион", "зехтин"] | t | 2 | viktors_ingredients = ["чушки", "домати", "моркови", "ябълки", "сол", |
| 3 | "черен пипер", "кимион", "зехтин"] | ||||
| 3 | 4 | ||||
| 4 | georgis_ingredients = ("чушки", "домати", "патладжан", "люти чушки", "олио", | 5 | georgis_ingredients = ("чушки", "домати", "патладжан", "люти чушки", "олио", | ||
| 5 | "захар", "чубрица", "черен пипер", "врачанска ракия") | 6 | "захар", "чубрица", "черен пипер", "врачанска ракия") | ||
| 6 | 7 | ||||
| 7 | shopping_list = viktors_ingredients + list(georgis_ingredients) | 8 | shopping_list = viktors_ingredients + list(georgis_ingredients) | ||
| 8 | shopping_list.reverse() | 9 | shopping_list.reverse() | ||
| 9 | 10 | ||||
| 10 | unique_ingredients = set(shopping_list) | 11 | unique_ingredients = set(shopping_list) | ||
| 11 | 12 | ||||
| 12 | ingredient_quantities = dict.fromkeys(unique_ingredients, 5) | 13 | ingredient_quantities = dict.fromkeys(unique_ingredients, 5) | ||
| 13 | ingredient_quantities["skyr"] = 1 | 14 | ingredient_quantities["skyr"] = 1 | ||
| 14 | 15 | ||||
| 15 | number_of_ingredients_to_buy = len(ingredient_quantities) | 16 | number_of_ingredients_to_buy = len(ingredient_quantities) |
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||