Can I write a lambda function in python of more than one line, and call other functions?
<p>I'm reading <a href="http://mitpress.mit.edu/sicp/" rel="nofollow"><em>Structure and Interpretation of Computer Programs</em></a> - famous in the field of computer science.</p>

<p>Encouraged by the functional programming, I tried to code in Python instead of Scheme because I find it easier to use. But then comes the question: I've needed a Lambda function many times, but I can't figure out how to use <code>lambda</code> to write an unnamed function with complicated operation.</p>

<p>Here, I want to write a lambda function with a string variable <code>exp</code> as its only argument and execute the <code>exec(exp)</code>. But I get an Error:</p>

<pre><code>&gt;&gt;&gt; t = lambda exp : exec(exp)
File "&lt;stdin&gt;", line 1
t = lambda exp : exec(exp)
                    ^
SyntaxError: invalid syntax
</code></pre>

<p>how does it happen? How to cope with it?</p>

<p>I read my Python guide book and searched Google without finding the answer I want. Does it mean that the <code>lambda</code> function in python is only designed to be syntactic sugar?</p>
