A = X > Y ? X : Y

Ben Wolfson rumjuggler at home.com
Tue Feb 8 20:25:41 EST 2000


On Wed, 09 Feb 2000 01:15:11 GMT, cjc26 at nospam.cornell.edu (Cliff Crawford)
wrote:

>Pada Tue, 08 Feb 2000 17:04:01 -0800, Curtis Jensen bilang:
>| I fear that this question has already been asked, but is there and
>| equivalant one line command that is equivalant to the C command:
>| 
>| a = x > y ? x : y
>
>a = (x > y and [x] or [y])[0]

Isn't this actually wrong?

-- 
Barnabas T. Rumjuggler

For the world, I count it not an inn, but an hospital, and a place, not to
live, but to die in.
 -- Thomas Browne



More information about the Python-list mailing list