# 1401.py def f(x,y): return x+2*y print f(y=2,x=7) # 11 ####################################### def f(x,y,z): return x+2*y+3*z print f(2,z=4,y=1) # 16 ####################################### def f(x,y,z=4): return x+2*y+3*z print f(2,1) # 16 print f(2,1,5) # 19 print f(2,z=5,y=1) # 19 def tel (nome,numero,prefisso='0532'): return [nome,prefisso+'-'+numero] print tel('Rossi','974002') # ['Rossi', '0532-974002'] ####################################### def f(x,v=[]): v.append(x); print v f(7) # [7] f(8) # [7, 8] ####################################### def f(x,y=3): print x+y; y+=1 f(1) # 4 f(1) # 4 - perche' y non e' mutabile.