simple question about Dictionary type containing List objects

G

gganesh

Hi group,
I have a dict object like
emails={'mycontacts': [ '(e-mail address removed), '(e-mail address removed)',
'(e-mail address removed)'], 'myname':['gganesh']}
I need to get the lenght of the list mycontacts ,like
mycontacts_numbers=3
help me to solve
Thanks
 
U

Ulrich Eckhardt

gganesh said:
I have a dict object like
emails={'mycontacts': [ '(e-mail address removed), '(e-mail address removed)',
'(e-mail address removed)'], 'myname':['gganesh']}
I need to get the lenght of the list mycontacts ,like
mycontacts_numbers=3

mycontacts = emails['mycontacts']
mycontacts_number = len(mycontacts)

A list doesn't change in behaviour when it is contained in a dictionary.

Uli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top