I am trying to find all the occurences of \"|\" in a string.
def findSectionOffsets(text): startingPos = 0 endPos = len(text) for position in te
It is easier to use regular expressions here;
import re def findSectionOffsets(text): for m in re.finditer('\|', text): print m.start(0)