Arbitrary Argument Lists : Function Tuple Parameters : Function : Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home »  Function   » [  Function Tuple Parameters  ]  Screenshots 
 



Arbitrary Argument Lists


#A function can be called with an arbitrary number of arguments. 
#These arguments will be wrapped up in a tuple. Before the variable number 
#of arguments, zero or more normal arguments may occur.

def fprintf(file, format, *args):
    file.write(format % args)



           
       
Related examples in the same category
1.  Any number of parameter: turn parameter into a tuple Any number of parameter: turn parameter into a tuple
2.  Unpacking Argument Lists Unpacking Argument Lists
3.  Parameter passing: mixed with dictionary and tuple Parameter passing: mixed with dictionary and tuple
4.  Illustrate parameter passing: tuple, type and tuple Illustrate parameter passing: tuple, type and tuple
5.  Re design the intersect and union using tuple parameter passing
























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