python:workout
This is an old revision of the document!
NOTES FROM PYTHON WORKOUT BOOK
SPLAT OPERATOR
Splat operator (aka *) allows a function to receive any number or arguments.
def mysum(*numbers): print(type(numbers)) # tuple mysum(1,2,3,4,5) # passing arbitrary number of arguments mysum(*[2,3,4,5,6]) # unpacking an iterable
python/workout.1772181068.txt.gz · Last modified: by v1ctor
