forked from root/public
![lopezesteban8@gmail.com](/git/assets/img/avatar_default.png)
1 changed files with 9 additions and 0 deletions
@ -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 [] |
Loading…
Reference in new issue