[Tutor] Different idioms for making lists of strings
Erik Price
erikprice@mac.com
Fri, 6 Sep 2002 00:21:36 -0400
On Thursday, September 5, 2002, at 07:35 PM, Scot W. Stevenson wrote:
> which of course is a lot easier to type, the computation involved
> should be
> trivial, and the days when you would have had to import the string
> module
> to do stuff like this are long over. So I thought I'd point it out to
> the
> rest of the crowd here.
That never would have occurred to me. And it is a quicker way to do
it. It doesn't feel as "right" (canonical?) as the traditional List
literal, but there's really nothing wrong with it.
I guess the only thing is that it's not as obvious as using a List
literal (assuming that obviousness is something that should be praised
in the Python approach), but it's hardly obfuscated.
Thanks Scot.
Erik
(PS: it reminds me of Perl's qw() function)
--
Erik Price
email: erikprice@mac.com
jabber: erikprice@jabber.org