title: ValueError: malformed string when using ast.literal_eval
body: <p>It is widely known that using <code>eval()</code> is a potential security risk so the use of <a href="http://docs.python.org/2/library/ast.html#ast.literal_eval"><code>ast.literal_eval(node_or_string)</code></a> is promoted</p>
  
  <p>However In python 2.7 it returns <code>ValueError: malformed string</code> when running this example:</p>
  
  <pre><code>&gt;&gt;&gt; ast.literal_eval("4 + 9")
  </code></pre>
  
  <p>Whereas in python 3.3 this example works as expected:</p>
  
  <pre><code>&gt;&gt;&gt; ast.literal_eval('4+9')
  13
  </code></pre>
  
  <p>Why does it run on python 3 and not python 2? How can I fix it in python 2.7 without using the risky <code>eval()</code> function?</p>