s.split() on multiple separators

mrkafk at gmail.com mrkafk at gmail.com
Sun Sep 30 15:08:28 EDT 2007


On 30 Wrz, 20:27, William James <w_a_x_... at yahoo.com> wrote:
> On Sep 30, 8:53 am, mrk... at gmail.com wrote:

> E:\Ruby>irb
> irb(main):001:0> ' abcde abc cba fdsa bcd '.split(/[ce ]/)
> => ["", "ab", "d", "", "ab", "", "", "ba", "fdsa", "b", "d"]

That's acceptable only if you write perfect ruby-to-python
translator. ;-P

Regards,
Marcin




More information about the Python-list mailing list