[melbourne-pug] Question about adding members to list : hypothetical just for interest kind of question

David Crisp dcrisp at netspace.net.au
Fri Feb 21 00:55:10 CET 2014


Thanks for the thoughts!

In this case I am reading in data from a SQL database query(pymssql) and 
feeding it into an excel spreedsheet (xlwt) Line by line which means I 
have to assemble the dict line by line.

And yes,  the name i chose in the email to represent what I was doing was 
generic.  THe one I am actually using is representative of the data its 
holding! :)   as apposed to a generic word which could actually be a 
keyword!

And Yes yes,  Theres quite a lot of data.  Many of these query returns 
have 3000 rows of data!

Regards,
David

On Fri, 21 Feb 2014, William ML Leslie wrote:

> On 21/02/2014 9:40 am, "Anthony Briggs" <anthony.briggs at gmail.com> wrote:
>>
>> You can also use the dict() function or dictionary comprehensions to
> create your dictionary:
>>   item = dict( (key, value) for key, value in list )
>>
>
> Otherwise written:
>  item = dict(list)
>


More information about the melbourne-pug mailing list