determining the bounds of a tuple returned from a database

Fredrik Lundh fredrik at pythonware.com
Fri Nov 17 01:51:45 EST 2006


ronrsr wrote:

> it looks like the  len() function is the one I want.
> 
> for:   len(result) - i get 248,
> 
> but for len(result[0]) or len(result[1]) i always get 0.

that's a bit surprising, because both items are tuples that contain 
exactly one item:

>> (('Agricultural subsidies; Foreign aid',), ('Agriculture; Sustainable
>> Agriculture - Support; Organic Agriculture; Pesticides, US, Childhood
>> Development, Birth Defects; Toxic Chemicals',),

</F>




More information about the Python-list mailing list