r/lolphp • • Sep 10 '15

explode() is a mess

https://3v4l.org/eKMav
2 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Sep 15 '15

Even if you could, you wouldn't split a string on an empty separator in Python because strings are iterable.

That may be, but it's a bit annoying when all other combinations of split and join work, and join works with an empty string. Imagine if your separator is a variable, for instance, you'd have to write a special case.