1viktors_ingredients = [
2 'чушки', 'домати', 'моркови', 'ябълки',
3 'сол', 'черен пипер', 'кимион', 'зехтин'
4 ]
5
6georgis_ingredients = (
7 'чушки', 'домати', 'патладжан', 'люти чушки',
8 'олио', 'захар', 'чубрица', 'черен пипер', 'врачанска ракия'
9 )
10
11shopping_list = viktors_ingredients + list(georgis_ingredients)
12shopping_list = shopping_list[::-1]
13
14unique_ingredients = set(shopping_list)
15
16ingredient_quantities = dict.fromkeys(unique_ingredients, 5)
17ingredient_quantities['skyr'] = 1
18
19number_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) | 11 | shopping_list = viktors_ingredients + list(georgis_ingredients) | ||
12 | shopping_list = shopping_list[::-1] | 12 | shopping_list = shopping_list[::-1] | ||
13 | 13 | ||||
14 | unique_ingredients = set(shopping_list) | 14 | unique_ingredients = set(shopping_list) | ||
n | n | 15 | |||
15 | ingredient_quantities = dict.fromkeys(unique_ingredients, 5) | 16 | ingredient_quantities = dict.fromkeys(unique_ingredients, 5) | ||
n | n | 17 | ingredient_quantities['skyr'] = 1 | ||
16 | 18 | ||||
t | 17 | ingredient_quantities['skyr'] = 1 | t | ||
18 | number_of_ingredients_to_buy = len(ingredient_quantities) | 19 | number_of_ingredients_to_buy = len(ingredient_quantities) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|