Arbitrary arguments

what are arbitrary arguments in python

Arbitrary Arguments, *args :
:black_small_square: If you do not know how many arguments that will be passed into your function, add a * before the parameter name in the function definition.
:black_small_square: This way the function will receive a tuple of arguments, and can access the items accordingly

In Python, *args allows a function to accept a variable number of positional arguments, storing them in a tuple. Similarly, **kwargs enables a function to accept an arbitrary number of keyword arguments, storing them in a dictionary. Combining both as (*args, **kwargs) allows a function to handle a flexible combination of positional and keyword arguments. This provides a versatile way to design functions that accommodate different parameter scenarios.

In Python, *args allows a function to accept a variable number of positional arguments, storing them in a tuple.
EXAMPLE:
def student(*name):
print(‘Welcome to the class of 2022-23:’)
for i in name:
print(i)

student(‘Ash’, ‘Betty’, ‘David’, ‘Sam’, ‘Lisa’, ‘John’)