On Apr 10, 12:36 pm, sophie_newbie wrote:
I've got a function that returns a dictionary, I need to loop and
return 1000 dictionaries and append them to a list, but the thing is
that when I do the list.append(funtThatReturnsDict()) the resulting
only ever has 1 dictionary attached to it, even af
> sophie_newbie (sn) wrote:
>sn> Hi there,
>sn> I've got a function that returns a dictionary, I need to loop and
>sn> return 1000 dictionaries and append them to a list, but the thing is
>sn> that when I do the list.append(funtThatReturnsDict()) the resulting
>sn> only ever has 1 dictionary
sophie_newbie wrote:
> Hi there,
>
> I've got a function that returns a dictionary, I need to loop and
> return 1000 dictionaries and append them to a list, but the thing is
> that when I do the list.append(funtThatReturnsDict()) the resulting
> only ever has 1 dictionary attached to it, even aft
On Apr 10, 9:49 pm, sophie_newbie wrote:
> Scratch everything I said, copy() does work. Made a wee mistake
> somewhere else.
>
> Apologies if I've wasted anyones time!
U ... if think you need a dict.copy() *after* the function has
returned, then you are likely to be doing it in a way that per
On Apr 10, 9:36 pm, sophie_newbie wrote:
> Hi there,
>
> I've got a function that returns a dictionary, I need to loop and
> return 1000 dictionaries and append them to a list, but the thing is
> that when I do the list.append(funtThatReturnsDict()) the resulting
> only ever has 1 dictionary attac
Scratch everything I said, copy() does work. Made a wee mistake
somewhere else.
Apologies if I've wasted anyones time!
On Apr 10, 12:36 pm, sophie_newbie wrote:
> Hi there,
>
> I've got a function that returns a dictionary, I need to loop and
> return 1000 dictionaries and append them to a list