Passing items of a lsit as arguments

Tobias Pfeiffer me at privacy.net
Fri Mar 26 22:31:47 CET 2004


Hi!

I want to call a function that was defined with *args in the header, e.g. 
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)

Thanks in Advance

Bye
Tobias

-- 
please send any mail to botedesschattens(at)web(dot)de



More information about the Python-list mailing list