Steven W. Orr wrote:
> I really tried. I give up.
>
> I got this one last time (for which I'm very grateful).
> ... 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.
>
> And for extra credit, I need the s
On 4/20/07, Steven W. Orr <[EMAIL PROTECTED]> wrote:
> I really tried. I give up.
>
> 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([s[0] for s in calendar.month_abbr[1:]]))
'ADFJMONS'
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
I really tried. I give up.
I got this one last time (for which I'm very grateful).
import calendar
months = dict([(month,ii) for ii,month in enumerate(calendar.month_abbr)][1:])
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. O