conditionals in lambdas?
Erik Max Francis
max at alcyone.com
Sat Nov 4 00:12:39 EST 2000
"Michael P. Soulier" wrote:
> I'd like to make something like this a lambda function. Is that
> possible?
Sure:
lambda s: s[:3] == 'yes'
It's not possible in the general case, where you have more involved
control structures being used.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ All the people in his neighborhood turn around and get mad and sing
\__/ Public Enemy
Official Buh rules / http://www.alcyone.com/max/projects/cards/buh/
The official rules to the betting card game, Buh.
More information about the Python-list
mailing list