
--- Ron Adam <rrr@ronadam.com> wrote:
# Tests
def a_g(s): return s[0].lower() in "abcdefg"
def h_m(s): return s[0].lower() in "hijklm"
def n_z(s): return s[0].lower() in "nopqrstuvwxyz"
decmps = [a_g, h_m, n_z] ag, hm, nz, other = decomp(src, *decmps)
print 'ag =', ag print 'hm =', hm print 'nz =', nz print 'other =', other
-------------------
ag = ['c8WQe60G6J', 'EMY7O8qzTg'] hm = ['lDunyeOM98', 'LJuPg8ncZd'] nz = ['uhhuhd9YdO', 'qAuQvfTc6N', 'vpJz47pkP5', 'YOq6m4IXBn'] other = ['8JE6PuXxBz', '4ttyMdpuQY']
Am I misunderstanding (de-comprehensing) something here? How does the code above return those result sets? Or, more specifically, why does ag include 'T' in its results set? ____________________________________________________________________________________ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html