python print first n values in dict code example
Example: get n items from dictionary python
list(islice(d.iteritems(), n))
'Update for Python 3.6
list(islice(d.items(), n))
list(islice(d.iteritems(), n))
'Update for Python 3.6
list(islice(d.items(), n))