I get the wrong string error.
Here are my testimonies
>>> eval("'Hello:: '+'fdsfds'") 'Hello:: fdsfds' >>> import ast >>> ast.literal_eval("'Hello:: '+'fdsfds'") Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> ast.literal_eval("'Hello:: '+'fdsfds'") File "C:\Python27\lib\ast.py", line 80, in literal_eval return _convert(node_or_string) File "C:\Python27\lib\ast.py", line 79, in _convert raise ValueError('malformed string') ValueError: malformed string
source share