Given the following list of sub-strings:
sub = ['ABC', 'VC', 'KI']
is there a way to get the index of these sub-string in the following string if they exist?
s = 'ABDDDABCTYYYYVCIIII'
so far I have tried:
for i in re.finditer('VC', s):
print(i.start, i.end)
However, re.finditer does not take multiple arguments.
thanks
find()returns only the first substring index, they seem to need all of matches.