question: parameters for create_polygon() method
Greg Krohn
greg at invalid.invalid
Wed May 5 01:18:01 EDT 2004
SeeBelow at SeeBelow.Nut wrote:
> Andrew Bennetts wrote:
>>create_polygon(*list_of_points)
>>-Andrew.
> Thanks Andrew, but I don't understand it. What's that * thing?
> Is there a * operator that converts a list of tuples into one big tuple?
>
> Mitchell Timin
It treats the list (i.e. list_of_points) as if each element was passed
as an argument to the function. In other words:
l = [1, 2, 3]
create_polygon(*l)
is the same as
create_polygon(1, 2, 3)
greg
More information about the Python-list
mailing list