Andrew Dalke wrote:
> Instead, he is bothered because the following doesn't work
> when sep == ""
>
> def split_join(s, sep):
> return s == sep.join(s.split(sep)):
>
That's pretty much it. Note that I'm not bothered so much to actually
do anything about it
I understand the infinite number of empty seperators though, and while
it might give pause I wonder (as an academic excercise) if you asked 100
people what "ABCDEF".split('') should return (if it returned anything at
all) what you would get. Again, don't bother answering this question,
list("ABCDEF") works just fine for me
Now, as for old chesnuts and long hot summers, if one could just do:
"".join(list("ABCDEF").reverse())
*ducks*