>>> import ast
>>> string = [Small, Medium, Large, X-Large]
>>> print string
[Small, Medium, Large, X-Large]
>>> string = ast.literal_eval(string)
Traceback (most recent call last):
File "<pyshell#26>", line 1, in <module>
string = ast.literal_eval(string)
File "C:Python27libast.py", line 80, in literal_eval
return _convert(node_or_string)
File "C:Python27libast.py", line 60, in _convert
return list(map(_convert, node.elts))
File "C:Python27libast.py", line 79, in _convert
raise ValueError( malformed string )
ValueError: malformed string
如何确定?