List as a value in a dictionary : Dictionary List : Dictionary PYTHON examples


PYTHON examples » Dictionary » Dictionary List »

 

List as a value in a dictionary


List as a value in a dictionary

mel = {'name': 'Mark',
        'jobs': ['trainer', 'writer'],
        'web':  'www.rmi.net/~lutz',
        'home': {'state': 'CO', 'zip':80501}}

print mel['name']

print mel['jobs']

print mel['jobs'][1]

print mel['home']['zip']



           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Dictionary
» Dictionary List