Arbitrary Argument Lists : Function Tuple Parameters « Function « Python
- Python
- Function
- Function Tuple Parameters
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