On Thu, 14 Jan 2010 09:07:47 -0800
Chris Rebert <c...@rebertia.com> wrote:
> Even more succinctly:
> 
> def ishex(s):
>     return all(c in string.hexdigits for c in s)

I'll see your two-liner and raise you.  :-)

ishex = lambda s: all(c in string.hexdigits for c in s)


-- 
D'Arcy J.M. Cain <da...@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to