Apr-10-2020, 07:03 PM
(This post was last modified: Apr-10-2020, 07:03 PM by astral_travel.)
another one which is simple, but i'm trying to understand the underlying theme...
how can this function be defined with 'food' and when it is called it is given the list argument ?
how can this function be defined with 'food' and when it is called it is given the list argument ?
def my_function(food): for x in food: print(x) fruits = ["apple", "banana", "cherry"] my_function(fruits)