sets and maps def func*args )print "number of arguments"lenargs sum for value in args sum +value print"sum of the arguments"sum when using the functionwe can pass variable number of arguments for each invocation for exampleall of the following are valid function callsfunc func func - which results in the following outputnumber of arguments sum of the arguments number of arguments sum of the arguments number of arguments sum of the arguments the asterisk next to the argument name (*argstells python to accept any number of arguments and to combine them into tuple the tuple is then passed to the function and assigned to the formal argument marked with the asterisk note the asterisk is only used in the argument list to indicate that the function or method can accept any number of arguments it is not part of the argument name the len(operation can be applied to the tuple to determine the number of actual arguments passed to the function the individual argumentswhich are elements in the tuplecan be accessed by using the subscript notation or by iterating the collection implementing the multiarray to implement the multiarray adtthe elements of the multi-dimensional array can be stored in single - array in row-major order not only does this create fast and compact array structurebut it' also the actual technique used by most programming languages partial implementation of the multiarray class is provided in listing listing the array py module with the multiarray class implementation of the multiarray adt using - array class multiarray creates multi-dimensional array def __init__self*dimensions )assert len(dimensions "the array must have or more dimensions the variable argument tuple contains the dim sizes self _dims dimensions