Python Example | An Introduction to Dictionary get() Function

This python example code shows you how to use python dictionary get() method correctly.

#!/usr/bin/python

dict = {'Name': 'Zabra', 'Age': 7}
print "Value : %s" %  dict.get('Age')
print "Value : %s" %  dict.get('Education', "Never")

This code will output:

Value : 7
Value : Never