Defining functions with list arguments
Function and Call
Section titled “Function and Call”Lists as arguments are just another variable:
def func(myList): for item in myList: print(item)and can be passed in the function call itself:
func([1,2,3,5,7])
12357Or as a variable:
aList = ['a','b','c','d']func(aList)
abcd