A = X > Y ? X : Y
Grant Edwards
nobody at nowhere.nohow
Sat Feb 12 22:24:36 EST 2000
On Tue, 08 Feb 2000 17:04:01 -0800, Curtis Jensen <cjensen at be-research.ucsd.edu> wrote:
>I fear that this question has already been asked,
Yes, it has.
>but is there and
>equivalant one line command that is equivalant to the C command:
>
>a = x > y ? x : y
Possibly.
Generally this question is answered with at least a half-dozen
or so one-line code examples -- almost all of which somebody
will claim are wrong in one respect or another. While there
may exist an equivalent chunk of Python code, the practical
answer seems to be that there isn't a _good_ (readable and
obviously correct) way to do this with one line of Python code.
--
Grant Edwards grante Yow! I'm in direct contact
at with many advanced fun
visi.com CONCEPTS.
More information about the Python-list
mailing list