simple question about Dictionary type containing List objects

Xavier Ho contact at xavierho.com
Mon Jul 13 12:36:55 CEST 2009


On Mon, Jul 13, 2009 at 6:34 PM, gganesh <ganesh.gbg at gmail.com> wrote:

> Hi group,
> I have a dict object like
> emails={'mycontacts': [ 'xxx at gmail.com, 'yy at gmail.com',
> 'zz at gmail.com'], 'myname':['gganesh']}
> I need to get the lenght of the list mycontacts ,like
> mycontacts_numbers=3 <http://mail.python.org/mailman/listinfo/python-list>
>

>>> len(emails['mycontacts'])
3

HTH,

Ching-Yun "Xavier" Ho, Technical Artist

Contact Information
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email: contact at xavierho.com
Website: http://xavierho.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090713/f2807dbb/attachment.html>


More information about the Python-list mailing list