Passing items of a lsit as arguments

Karl Pflästerer sigurd at 12move.de
Fri Mar 26 17:32:55 EST 2004


On 26 Mar 2004, Tobias Pfeiffer <- me at privacy.net wrote:

> the Tkinter.Canvas.create_polygon function. I got the coordinates in a 
> long list but how can I achieve that every item in this list is passed as 
> a single parameter?

> Example:
> bla = [(1,2), (3,4), (5,6), ...]
> has to become
> create_polygon((1,2), (3,4), (5,6), ..., fill=blue)

Either:
apply(create_polygon, bla)
or:
create_polygon(* bla)


   KP

-- 
You know you've been sitting in front of your Lisp machine too long
when you go out to the junk food machine and start wondering how to
make it give you the CADR of Item H so you can get that yummie
chocolate cupcake that's stuck behind the disgusting vanilla one.



More information about the Python-list mailing list