Importing an output from another function
John Salerno
johnjsal at NOSPAMgmail.com
Fri Mar 17 16:32:50 EST 2006
James Stroud wrote:
> Try this (I think its called "argument expansion", but I really don't
> know what its called, so I can't point you to docs):
>
> def Func1():
> choice = ('A', 'B', 'C')
> output = random.choice(choice)
> output2 = random.choice(choice)
> return output, output2
>
> def Func2(*items):
> print items
>
> output = Func1()
> Func2(*output1)
I was wondering about '*items' when I wrote my response. I left out the
asterisk in my version and it still seems to work. Is it necessary?
More information about the Python-list
mailing list