I agree the docstring is a bit confusing and could be clarified
as to what's happening

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


You should be able to use something like

s = "a_a_a_a_"
count = len([i for i in range(len(s)) if s.startswith("_a_", i)])

which will count the way you wanted, rather than the currently 
existing count() behavior.

-tkc



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to