On Wed, 25 Jun 2008 16:02:52 -0700, John Machin wrote:

> Here's one approach (requires Python 2.5 or later):
> [(50 if x < 50 else x, 50 if y < 50 else y, 50 if z < 50 else z) for
> (x, y, z) in source]

[(max(x, 50), max(y, 50), max(z, 50)) for (x, y, z) in source]

-- 
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 -- pass it on
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to