[Tutor] A list of input arguments
kent37 at tds.net
Tue Jan 13 13:42:11 CET 2009
On Tue, Jan 13, 2009 at 6:32 AM, Mr Gerard Kelly
<s4027340 at student.uq.edu.au> wrote:
> My only other question is, does there exist a convenient way to unpack a
> collection of variable length?
> If you know that there are 3 elements in the collection, you can specify:
> But then if you want to change the number of elements in the list
> "chord", say from 3 to 5, you have to change the code accordingly. Is
> there some sort of way to instruct the code to unpack its elements for
> any number of elements?
Presuming that waves() is defined to take an arbitrary number of arguments, e.g.
you can use
to call it with a variable number of arguments.
More information about the Tutor