import re
str = 'we need to inform him with the latest information'
for i in re.finditer('inform', str):
    loctup = i.span()
    print(loctup)

3d9506d185c67db5aaf0e62f26b2c7ee41a39d3e
<mask token>

<mask token>
for i in re.finditer('inform', str):
    loctup = i.span()
    print(loctup)

<mask token>
str = 'we need to inform him with the latest information'
for i in re.finditer('inform', str):
    loctup = i.span()
    print(loctup)

import re
str = 'we need to inform him with the latest information'
for i in re.finditer('inform', str):
    loctup = i.span()
    print(loctup)
