> You could (in 2.5) use:
> 
>    [(x if x%2 else 'even') for x in '1234']

Or this:

     [int(x)&1 and x or 'even' for x in '1234']
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to