Meaning of asterisk in (*args)


#1

In one of the lessons for functions, the example program was:

def biggest_number(*args):
print max(args)
return max(args)

biggest_number(-10, -5, 5, 10)

Why is there an asterisk in (*args)? What is its purpose? Is it necessary?


#2

It’s like a wild card modifier that permits any number of arguments in the function call.


#3

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