inside the functionthe arguments are assigned to variables called parameters here is an example of user-defined function that takes an argument def print_twice(bruce)print(bruceprint(brucethis function assigns the argument to parameter named bruce when the function is calledit prints the value of the parameter twice print_twice('spam'spam spam print_twice ( print_twice(math pi the same rules of composition that apply to built-in functions also apply to user-defined functionsso we can use any kind of expression as an argument for print_twice print_twice ('spam '* spam spamspamspam spam spamspamspam print_twice(math cos(math pi)- - the argument is evaluated before the function is calledso in the examples the expressions 'spam '* and math cos(math piare only evaluated once variables and parameters are localwhen you create variable inside functionit is localwhich means that it only exists inside the function for example def cat_twice(part part )cat part part print_twice(cat