Xah Lee <[EMAIL PROTECTED]> wrote:
> if i have
> mytext.replace(a,b)
> how to find out many many occurances has been replaced?
If 'a' and 'b' are different length,
- Count the string length, before and after. The difference should
be multiple of difference between length of 'a' and 'b'.
If they are same length,
- Split 'mytext', and count items.
--
William Park <[EMAIL PROTECTED]>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
--
http://mail.python.org/mailman/listinfo/python-list