control structures and functions we can also use the sequence unpacking operator in function' parameter list this is useful when we want to create functions that can take variable number of positional arguments here is product(function that computes the product of the arguments it is givendef product(*args)result for arg in argsresult *arg return result this function has one parameter called args having the in front means that inside the function the args parameter will be tuple with its items set to however many positional arguments are given here are few example callsproduct( product( product( args =( )returns args =( )returns args =( ,)returns we can have keyword arguments following positional argumentsas this function to calculate the sum of its argumentseach raised to the given powershowsdef sum_of_powers(*argspower= )result for arg in argsresult +arg *power return result the function can be called with just positional argumentsfor examplesum_of_powers( )or with both positional and keyword argumentsfor examplesum_of_powers( power= it is also possible to use as "parameterin its own right this is used to signify that there can be no positional arguments after the *although keyword arguments are allowed here is modified version of the heron(function this time the function takes exactly three positional argumentsand has one optional keyword argument def heron (abc*units="square meters") ( area math sqrt( ( ( ( )return "{ { }format(areaunitshere are few example callsheron ( returns' square metersheron ( units="sq inches"returns' sq inches