Keyword Parameters and Defaults : Function Keyword Arguments : Function PYTHON examples


PYTHON examples » Function » Function Keyword Arguments »

 

Keyword Parameters and Defaults


Keyword Parameters and Defaults

def hello_1(greeting, name):
    print '%s, %s!' % (greeting, name)

def hello_2(name, greeting):
    print '%s, %s!' % (name, greeting)


hello_1('Hello', 'world')
hello_2('Hello', 'world')


hello_1(greeting='Hello', name='world')


hello_1(name='world', greeting='Hello')


hello_2(greeting='Hello', name='world')



           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Function
» Function Keyword Arguments