y=if x>High: 2 elif x<Low: 1 else: 0

gr gr86882 at i-one.at
Wed May 22 17:39:27 EDT 2002


Hi,
is there a simple possiblity to "teach" Python:

y=if x>High: 2 elif x<Low: 1 else: 0

instead of

if x>High:
   y=2
elif x<Low:
   y=1
else:
   y=0

Thanks,
gr



More information about the Python-list mailing list