python dictionary calling code example
Example 1: what is a dictionary in programming
// This is a JS Object (dictionary eqiv.)
var obj = {
num:16,
str:'hello',
bool:true
};
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']