python function parameter list code example
Example 1: pass a list to a function in python
def someFunc(myList = [], *args):
for x in myList:
print x
Example 2: python list arguments of function
def my_function(food):
for x in food:
print(x)
fruits = ["apple", "banana", "cherry"]
my_function(fruits)