why "g".count('')==2 ?

Fredrik Lundh fredrik at pythonware.com
Sat Mar 11 13:37:05 CET 2006


"ygao" wrote:

> my question is as title!

my answer as code:

>>> s = "g"
>>> t = ""
>>> s[0:0+len(t)] == t
True
>>> s[1:1+len(t)] == t
True

</F>






More information about the Python-list mailing list