without the "print" also gives me error:-<br>
<br>
>>> lambda_hrs = lambda x : x/60,x%60<br>
Traceback (most recent call last):<br>
  File "<stdin>", line 1, in ?<br>
NameError: name 'x' is not defined<br>
<br>
<br><div><span class="gmail_quote">On 12/5/05, <b class="gmail_sendername">Mohammad Jeffry</b> <<a href="mailto:linuxlah@gmail.com">linuxlah@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear All,<br>
<br>
Can't a lambda uses the input parameter more then once in the lambda body? <br>
eg: <br>
lambda x : print x/60,x%60<br>
<br>
I tried with def and it works but got syntax error with lambda. Below is an interactive sample:<br>
<br>
linuxlah@algorhythm ~ $ python<br>
Python 2.4.2 (#1, Nov 18 2005, 19:32:15) <br>
[GCC 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on linux2<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>> def func_hrs(x): print x/60,x%60<br>
... <br>
>>> func_hrs(400)<br>
6 40<br>
>>> lambda_hrs = lambda x : print x/60,x%60<br>
  File "<stdin>", line 1<br>
    lambda_hrs = lambda x : print x/60,x%60<br>                               
^<br>
SyntaxError: invalid syntax<br>
>>> <br>
<br>
My main concern is how can I do this in lambda?<br><span class="sg">
<br>
<br clear="all"><br>-- <br>And whoever does an atom's weight of evil will see it.

</span></blockquote></div><br><br clear="all"><br>-- <br>And whoever does an atom's weight of evil will see it.