Skip to content

Instantly share code, notes, and snippets.

@DeastinY
Created July 29, 2016 08:11
Show Gist options
  • Save DeastinY/3cd59773275ab021d2ddea4824eae2bb to your computer and use it in GitHub Desktop.
Save DeastinY/3cd59773275ab021d2ddea4824eae2bb to your computer and use it in GitHub Desktop.
Readline
>>> import json
>>> f = open("somefile.json")
>>> d = json.load(f)
>>> print d
{u'95659045': {u'90': False}}
>>> f.seek(0)
>>> l = f.readlines()
>>> print l
['{"95659045": {"1": false}, "95659045": {"90": false}}']
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment