Is there a nicer way to do this?

Casey Caseyweb at gmail.com
Thu Oct 4 17:57:41 EDT 2007


On Oct 4, 5:42 pm, Casey <Casey... at gmail.com> wrote:
> Not sure if this is really better or even more pythonic, but if you
> like one-liners that exercise the language:

Hmm, I guess it WAS more pythonic, since three of us gave essentially
identical responses in a 10-minute period.  That being said, I'd
recommend a good comment before the one-liner describing what the
output dictionary is going to look like. Anyone who reads your code
(including yourself, two weeks later) will thank you!




More information about the Python-list mailing list