"""
NOTE: dictionaries do NOT remember the order in which
key : value pairs have been stored
"""
d = {"a" : 5, "b" : 1, "c" : 8, "d" : 4, "e" : 3, "f" : 10, "g": 2}
# getting the first n key : value pairs
n = 3
first_n = dict(zip(list(d.keys())[:n], list(d.values())[:n]))
first_n
>>> {'a': 5, 'b': 1, 'c': 8}