Python code to generate shopping lists based on a number of meals to be cooked