Steven D'Aprano a écrit :
> On Wed, 11 Apr 2007 21:03:20 +0200, Bruno Desthuilliers wrote:
>
>
>>Greg Corradini a écrit :
>>
>>>Hello All,
>>>I'm attempting to create multiple dictionaries at once, each with unique
>>>variable names. The number of dictionaries i need to create depends on the
>>>l
On Wed, 11 Apr 2007 21:03:20 +0200, Bruno Desthuilliers wrote:
> Greg Corradini a écrit :
>> Hello All,
>> I'm attempting to create multiple dictionaries at once, each with unique
>> variable names. The number of dictionaries i need to create depends on the
>> length of a list, which was returned
Greg Corradini a écrit :
> Bruno,
> Your help is much appreciated.
Then give thanks to Dennis too !-)
> I will give this a try tomorrow morning and
> get back on how it works.
Don't worry, it just works - and it's the idiomatic solution to the
problem you described.
--
http://mail.python.org
to store your dicts:
>
> returnedlist = [x,y,z]
> dicts = dict()
> for num, item in enumerate(returnedlist):
> dicts['dict%s' % num] = dict()
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
View this message in context:
http://www.nab
Greg Corradini a écrit :
> Hello All,
> I'm attempting to create multiple dictionaries at once, each with unique
> variable names. The number of dictionaries i need to create depends on the
> length of a list, which was returned from a previous function.
> The pseudo code for this problem would be:
t:
http://www.nabble.com/Creating-Unique-Dictionary-Variables-from-List-tf3560471.html#a9943321
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
t:
http://www.nabble.com/Creating-Unique-Dictionary-Variables-from-List-tf3560470.html#a9943320
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
bble.com/Creating-Unique-Dictionary-Variables-from-List-tf3560469.html#a9943317
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list