using methods with variable argument lists sometimes you create methods that can take variable number of arguments handling this sort of situation is something python does well here are the two kinds of variable arguments that you can create*argsprovides list of unnamed arguments **kwargsprovides list of named arguments the actual names of the arguments don' matterbut python developers use *args and **kwargs as convention so that other python developers know that they're variable list of arguments notice that the first variable argument has just one asterisk (*associated with itwhich means the arguments are unnamed the second variable has two asteriskswhich means that the arguments are named the following steps demonstrate how to use both approaches to writing an application this example also appears with the downloadable source code as variableargs py open python file window you see an editor in which you can type the example code type the following code into the window -pressing enter after each lineclass myclassdef printlist (*args)for countitem in enumerate(args)print("{ { }format(countitem)def printlist (**kwargs)for namevalue in kwargs items()print("{ likes { }format(namevalue)myclass printlist ("red""blue""green"myclass printlist (george="red"sue="blue"zarah="green"for the purposes of this exampleyou're seeing the arguments implemented as part of class method howeveryou can use them just as easily with an instance method look carefully at printlist (and you see new method of using for loop to iterate through list in this casethe enumerate(function outputs both count (the loop countand the string that was passed to the function