 <p>In python <strong>2.X</strong> <code>print</code> is a <em>statement</em> not a function. Accordingly, this is not supported by <code>lambda</code> functions. In python 3, however, <code>lambda x: print(x)</code> works since <code>print</code> is a function. You could also try to import the new <code>print</code> functionality in python 2.X:</p> <pre><code>from __future__ import print_function f = lambda x: print(x) f(4) </code></pre> <p>which prints <code>4</code>.</p>