From: Alan Chen Date: 2002-09-26T03:54:03+09:00 Subject: Re: Expanding an array to function args On Thu, Sep 26, 2002 at 03:23:23AM +0900, Travis Whitton wrote: > args = [1,2] > sum(args) # need a way to expand args to be arguments a and b. > > I fully understand that an array is a single object and that's why > the above code would fail(missing second argument), but I'm wondering > if there's a simple way to achieve what I'm looking for. Yes there is, placing a * ahead of the array expands the arguments, sum(*args) -- Alan Chen Digikata LLC http://digikata.com