Stupid string.split question

John Machin sjmachin at
Thu Aug 7 14:43:13 CEST 2003

"Batista, Facundo" <FBatista at> wrote in message news:<mailman.1060203253.27675.python-list at>...
> #- Is there any conceptual reason why
> #- 
> #- "ABCDEF".split("") shouldn't equal ["A", "B", "C", "D", "E", "F"]?
> #- 
> #- The error says empty seperator, but the result makes sense 
> #- given that 
> #- fact and the fact that:
> #- 
> #- "".join(["A", "B", "C", "D", "E", "F"]) == "ABCDEF"
> #- 
> #- It seems that if you can join with an empty seperator, you should be 
> #- able to split with one.
> Beyond any particular reason, or a better way to do it, seems nice to me to
> be able to split with empty separator, just to thin of join and split as
> "complementary" functions (but that's just my opinion).

All the old chestnuts are being dragged out ... looks like it's going
to be a long hot summer :-)

More information about the Python-list mailing list