ruby %w equivalent

Piet van Oostrum piet at cs.uu.nl
Wed Sep 27 06:38:58 EDT 2006


>>>>> hg <hg at nospam.com> (A) wrote:

>A> Antoine De Groote wrote:
>>> Hi everybody,
>>> 
>>> is there a python equivalent for the ruby %w operator?
>>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>> 
>>> Thanks a lot
>>> Regards,
>>> antoine

>A> Why would they want to make such an obscure API ? ... didn't they have
>A> Python to learn from (I am truly amazed - nothing cynical ...just ...
>A> why ?!!!!)

I think it is modeled after Perl.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list