Creating Dictionaries in Python
Posted by Samath
Last Updated: January 13, 2017

In this program I show how to create Dictionaries using the Python programming language. 

d1 = {}
d1 = {}
d1['k1'] = 'v1'
d1['k2'] = 'v2'
print 'd1 = ', d1
d2 = {'k3': 'v3', 'k4': 'v4', 'k5': 'v5'}
print 'd2 = ', d2

 

Related Content