String comparison question

Michael Spencer mahs at telcopartners.com
Mon Mar 20 14:41:25 EST 2006


Fredrik Lundh wrote:

> 
>>>> " hello world ".split()
> ['hello', 'world']

a.split() == b.split() is a convenient test, provided you want to normalize
whitespace rather than ignore it.  I took the OP's requirements to mean that
'A   B' == 'AB', but this is just a guess.


Michael




More information about the Python-list mailing list