[Tutor] can i pass a list to a function and get one back ?
nephish at gmail.com
Sun Oct 22 04:12:36 CEST 2006
great, thanks, i have idle right here, would have been just as easy.
sorry about that
On 10/21/06, Bill Campbell <bill at celestial.net> wrote:
> On Sat, Oct 21, 2006, shawn bright wrote:
> > hey there, i was just wondering if i could get a list back from a
> > function.
> > something like
> > def return_a_list(some_var):
> > some_list = 
> > for i in range(5):
> > var = some_var + i
> > some_list.append(var)
> > return some_list
> > is this cool ?
> The best way to find answers to questions like this is to just do
> it, and see what python does.
> INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC
> URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
> FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206)
> ``It will be of little avail to the people that the laws are made by men
> their own choice if the laws be so voluminous that they cannot be read, or
> so incoherent that they cannot be understood.''
> -James Madison, Federalist Paper #62
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor