Select as dictionary...

Besturk.Net Admin besturk at
Mon Oct 1 15:32:07 CEST 2007

I am using python with postgresql.
And i have a query :

aia.execute("SELECT id, w from list")
print links

and result
[(1, 5), (2,5).......] (2 million result)

I want to see this result directly as a dictionary:

{1: 5, 2: 5 .....}

How do i select in this format ?

I'm sorry my bad english.

 King Regards...

More information about the Python-list mailing list