d = {'k1':1,'k2':2}

"""
Explanation: Advanced Dictionaries
Unlike some of the other Data Structures we've worked with, most of the really useful methods available to us in Dictionaries have already been explored throughout this course. Here we will touch on just a few more for good measure:
End of explanation
"""


{x:x**2 for x in range(10)}

"""
Explanation: Dictionary Comprehensions
Just like List Comprehensions, Dictionary Data Types also support their own version of comprehension for quick creation. It is not as commonly used as List Comprehensions, but the syntax is:
End of explanation
"""


for k in d.iterkeys():
    print k

for v in d.itervalues():
    print v

for item in d.iteritems():
    print item

"""
Explanation: One of the reasons it is not as common is the difficulty in structuring the key names that are not based off the values.
Iteration over keys,values, and items
Dictionaries can be iterated over using the iter methods available in a dictionary. For example:
End of explanation
"""


d.viewitems()

d.viewkeys()

d.viewvalues()

"""
Explanation: view items,keys and values
You can use the view methods to view items keys and values. For example:
End of explanation
"""


