List as a value in a dictionary : Dictionary List « Dictionary « Python






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 examples in the same category