Python – Functions with Argument Lists
Python function with Argument List
In Python, Arguments in a function may be of any data types like list, string, dictionary etc., Inside the function also it is treated as the same data type.
If we give List as an argument to the function, it will consider the argument as List even if it is inside the function. Let us give List as an argument to the function and verify the results of it. For example, let us give a list of class 5 students as an argument to the function names.
def names(students): for x in students: print(x) class5 = ["naveen", "bhavana", "vamsi","priya"] names(class5)