We were doing something like this last week

thestring = "a_a_a_a_"
>>> for x in range(len(thestring)):
...     try:
...             thestring.count("_a_", x, x + 3)
...     except ValueError:
...             pass

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

Reply via email to