After using request library , am getting below dict in response.json()
{u'xyz': {u'key1': None, u'key2': u'Value2'}}
I want to remove all unicode characters and print only key value pairs without unicode chars
I have tried below method to remove , but it shows malformed string
>>> import json, ast
>>> c = {u'xyz': {u'key1': None,u'key2': u'Value2'}}
>>> ast.literal_eval(json.dumps(c))
Getting 'ValueError: malformed string'
Any suggestion on how to do it ?

所有评论(0)