A = X > Y ? X : Y

Cliff Crawford cjc26 at nospam.cornell.edu
Tue Feb 8 20:15:11 EST 2000


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]

now-don't-ever-use-it-ly y'rs, Cliff


-- 
cliff crawford  -><-  http://www.people.cornell.edu/pages/cjc26/
                      I think, therefore I'm single.



More information about the Python-list mailing list