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