Re: [Tutor] variable within function retains value

2009-06-18 Thread karma
Excellent, thanks for that answer Kent. Also thanks for the link 2009/6/18 Kent Johnson : > On Thu, Jun 18, 2009 at 6:21 AM, karma wrote: >> Hi All, >> >> I'm trying to write a function that flattens a list. However after I >> call the function more than once, it appends the result (a list) from

Re: [Tutor] variable within function retains value

2009-06-18 Thread Kent Johnson
On Thu, Jun 18, 2009 at 6:21 AM, karma wrote: > Hi All, > > I'm trying to write a function that flattens a list. However after I > call the function more than once, it appends the result (a list) from > the second call with the first. I can get around it by either setting > the list to an empty one

[Tutor] variable within function retains value

2009-06-18 Thread karma
Hi All, I'm trying to write a function that flattens a list. However after I call the function more than once, it appends the result (a list) from the second call with the first. I can get around it by either setting the list to an empty one before calling the function, but I would like to keep it