Mega Code Archive

 
Categories / Python Tutorial / Function
 

Functions can also be called using keyword arguments of the form keyword = value For instance, the following function

def  parrot(voltage,  state='a stiff',  action='voom',  type='Blue'):        print action,        print voltage         print type        print state parrot(1000) parrot(action = 'V', voltage = 1) parrot('A', state = 'state') parrot('B', 'C', 'D')