Hi all, i've noticed a strange beaviour of string.count:
in my mind this code must work in this way: str = "a_a_a_a_" howmuch = str.count("_a_") print howmuch -> 3 but the count return only 2 Ok this can be fine, but why? The doc string tell that count will return the number of substring in the master string, if we spoke about substring i count 3 substring... Can someone explain me this? And in which way i can count all the occurrence of a substring in a master string? (yes all occurrence reusing already counter character if needed) Thanks a lot Matteo Rattotti www.rknet.it Powered by: - MacOsX - Gnu / Linux Debian Sarge - Amiga Os 3.9 - Milk -- http://mail.python.org/mailman/listinfo/python-list