@ Introducing Python: Modern Computing in Simple Packages by Bill Lubanovic (No. 2664 / 12833)
add_args(5,9)
You can combine this with the *args and **kwargs techniques.
I've tried.
http://ideone.com/MgMBZr
def sum_args(*args):
return sum(args)
res = sum_args(1,2,3,4,5)
print(res)
result
Success time: 0 memory: 23304 signal:0
15
Recommended Posts