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')
|
|
|
|
|
Related Scripts with Example Source Code in same category :
-
-
|
|