Question about food parameter


What’s the food list ?

FAQ: Learn Python: A Day at the Supermarket - Making a Purchase

its a list representing the products a customer wants to buy from your store, one of such possible lists is defined at line 1 (shopping_list)

we can pass different lists at function call as argument


what is wrong in my code ?


your function should work for multiple lists, not ever customer is going to buy the same products. We can represent this different customers with different function calls:

compute_bill(['apple', 'orange'])


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.