print first n elements of dictionary python 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))