Skip to content

Instantly share code, notes, and snippets.

@thushw
Created June 4, 2018 04:58
Show Gist options
  • Save thushw/c29003865097dfa8f9b14d56e2edd0ef to your computer and use it in GitHub Desktop.
Save thushw/c29003865097dfa8f9b14d56e2edd0ef to your computer and use it in GitHub Desktop.
import json
jb = json.loads(jsonbblob)
from collections import namedtuple
print (jb['data'][0].keys())
Puzzle = namedtuple('Puzzle', jb['data'][0].keys())
puzzles = [Puzzle(*puz.values()) for puz in jb['data']]
for p in puzzles:
print (p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment