python access key value in dict code example
Example 1: python dict access
my_dict = {'name':'Jack', 'age': 26}
my_dict['name']
Example 2: how to get element from dictionary python
#!/usr/bin/python
dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}
dict['Age'] = 8; # update existing entry
dict['School'] = "DPS School"; # Add new entry
print "dict['Age']: ", dict['Age']
print "dict['School']: ", dict['School']