On Tue, 15 Sep 2009 14:31:26 +0200, Ulrich Eckhardt wrote:
Hi!
'abc'.split('') gives me a ValueError: empty separator. However,
''.join(['a', 'b', 'c']) gives me 'abc'.
Why this asymmetry?
The docs say
If sep is given, consecutive delimiters are not grouped together and are
deemed to
On Tuesday 15 September 2009 14:50:11 Xavier Ho wrote:
On Tue, Sep 15, 2009 at 10:31 PM, Ulrich Eckhardt
eckha...@satorlaser.comwrote:
'abc'.split('') gives me a ValueError: empty separator.
However, ''.join(['a', 'b', 'c']) gives me 'abc'.
Why this asymmetry? I was under the impression
Hi!
'abc'.split('') gives me a ValueError: empty separator.
However, ''.join(['a', 'b', 'c']) gives me 'abc'.
Why this asymmetry? I was under the impression that the two would be
complementary.
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
--
On Tue, Sep 15, 2009 at 10:31 PM, Ulrich Eckhardt
eckha...@satorlaser.comwrote:
'abc'.split('') gives me a ValueError: empty separator.
However, ''.join(['a', 'b', 'c']) gives me 'abc'.
Why this asymmetry? I was under the impression that the two would be
complementary.
I'm not sure about
Ulrich Eckhardt wrote:
Hi!
'abc'.split('') gives me a ValueError: empty separator.
However, ''.join(['a', 'b', 'c']) gives me 'abc'.
Why this asymmetry? I was under the impression that the two would be
complementary.
Uli
I think the problem is that join() is lossy; if you try
Vlastimil Brom wrote:
2009/9/15 Ulrich Eckhardt eckha...@satorlaser.com:
Hi!
'abc'.split('') gives me a ValueError: empty separator.
However, ''.join(['a', 'b', 'c']) gives me 'abc'.
Why this asymmetry? I was under the impression that the two would be
complementary.
Uli
maybe it isn't