Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> data = json.loads(open('data.txt').read())
- >>> data
- [{u'text': u'dicks1'}, {u'text': u'dicks2'}, {u'text': u'vag1'}, {u'text': u'vag2'}]
- >>> with open('data.txt', 'w') as outfile:
- ... json.dump(data, outfile)
- ...
- >>> data = json.loads(open('data.txt').read())
- >>> data
- [{u'text': u'dicks1'}, {u'text': u'dicks2'}, {u'text': u'vag1'}, {u'text': u'vag2'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement