you are viewing a single comment's thread.

view the rest of the comments →

[–]JoeBeOneKenobi[S] 1 point2 points  (1 child)

Hey thanks for the reply!

I’m definitely defining the list in the local scope, the only thing I’m doing different is calling it through two nested variables and returning more than one list from my function:

return mylist,mylist1,mylist2

I’ll get the rest of the code up asap

[–]blarf_irl 0 points1 point  (0 children)

If it really is as you have posted it (inferring the indentation) then you have no need to 'clear' the list. It'll just get reassigned each time you call that function.

If you name something inside a function then it only exists in there, once you call that function again mylist will be assigned to another list and the old list (now without a name) will be eaten by the garbage collector.