Skip to content

Instantly share code, notes, and snippets.

@ant358
Created February 24, 2019 08:14
Show Gist options
  • Save ant358/29b3a66ce5edd9872b52aebc0c1dfbe8 to your computer and use it in GitHub Desktop.
Save ant358/29b3a66ce5edd9872b52aebc0c1dfbe8 to your computer and use it in GitHub Desktop.
def first_n_pairs(dict_to_see, n):
""" Useful with large dictionarys to see what thae data looks like"""
a = {k: dict_to_see[k] for k in list(dict_to_see)[:n]}
print(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment