print dict values code example
Example 1: printing python dictionary values
#print keys and values from the dictionary
for k, v in dic.items():
print(k, v)
Example 2: dictionary in python
d = {'key1':'value1','key2':'value2'}
print(d) # to print full dictionary
l=d.keys
print(l) # to print keys
b=d.values
print(b)#to print values in dictionary
Example 3: howe to print all values and keysin d
for i in d:
print d.keys(i), d.values(i)
Example 4: howe to print all values and keysin d
for i in d:
print i, d[i]