how to find all occurrences of a pattern and their indices in python,"[x.span() for x in re.finditer('foo', 'foo foo foo foo')]"