In article <[EMAIL PROTECTED]>, Steven W. Orr wrote:
> Now I want something that's going to give me a string whose value is the 
> set of all of the first letters of months. Order is not important.

"".join(set(m[0] for m in calendar.month_abbr[1:]))

> And for extra credit, I need the string whose value is the set of all of 
> the letters of months minus the first letter.

"".join(set("".join(m[1:] for m in calendar.month_abbr[1:])))

Those are the ways that are obvious to me anyway, maybe there are
better ways. If you actually want a set not a string, remove the
outer-most "".join().
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to