Accessing values from a Unicode dictionary in Python
Question: I have Unicode values similar to this in a dictionary:

    
    
    {u'id': u'100000000265946', u'name': u'Sophia N Art Fuentes'}
    {u'id': u'100000538132142', u'name': u'Tatiana Vargas'}
    {u'id': u'1669912701', u'name': u'Milvia Albanez'}
    

I need to access keys and values but I'm getting this error

> AttributeError: 'unicode' object has no attribute 'keys'

I am using Python 2.7. Is there any method to convert Unicode to ASCII? Or how
do I access the values as Unicode itself?


Answer: 
    >>> s = u"{u'id': u'100000000265946', u'name': u'Sophia N Art Fuentes'}"
    >>> s.keys()
    
    Traceback (most recent call last):
      File "<pyshell#12>", line 1, in <module>
        s.keys()
    AttributeError: 'unicode' object has no attribute 'keys'
    >>> import ast
    >>> d = ast.literal_eval(s)
    >>> d.keys()
    [u'id', u'name']
    

