Python string split weirdness


>>> ''.split()

That seems okay... split an empty string on whitespace and you get an empty list, sure, why not.

Except that in every other case, if you split a string on a separator that it doesn't contain, you get a list containing the original string - even if the original …

more ...