String comparison question

Fredrik Lundh fredrik at pythonware.com
Wed Mar 22 03:32:23 EST 2006


Michael Spencer wrote:

> 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.

I'm sure someone has studied this in more detail, but intuitively, partially
based on common mistakes when writing regular expressions, I'd say that
when people talk about "any number of something", they mean "one or
more" more often than not.

</F>






More information about the Python-list mailing list