diff --git a/sh/tests/solutions/shopping.py b/sh/tests/solutions/shopping.py new file mode 100644 index 00000000..75c13af5 --- /dev/null +++ b/sh/tests/solutions/shopping.py @@ -0,0 +1,9 @@ +def clean_list(shopping_list): + if shopping_list: + cleaned_list = ([f"{index + 1}x/ {item.strip().capitalize()}" + for index, item in enumerate(shopping_list)]) + if "milk" not in cleaned_list: + cleaned_list.append("milk") + return cleaned_list + else: + return []