Keyword Parameters and Defaults : Function Keyword Arguments : Function : Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home »  Function   » [  Function Keyword Arguments  ]  Screenshots 
 



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 examples in the same category
1.  Keyword arguments example. Keyword arguments example.
2.  Keyword Arguments Demo Keyword Arguments Demo
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.