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


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0