On Fri, Jun 8, 2012 at 7:41 PM, stayvoid <stayv...@gmail.com> wrote:
> Hello,
>
> I want to pass several values to a function which is located on a
> server (so I can't change its behavior).
> That function only accepts five values which must be ints.
>
> There are several lists:
> a = [1, 2, 3, 4, 5]
> b = [5, 4, 3, 2, 1]
> c = [0, 0, 0, 0, 0]
>
> I want to pass each value from these lists to that function.
> What is the most pythonic way?
>

function(*a)

* expands a list into positional arguments and ** expands a dictionary
into keyword arguments.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to