You are viewing a single comment's thread. Return to all comments →
import re s = input() k = input() result = [(i.start(),i.end()+len(k)-1) for i in re.finditer('(?={0})'.format(k), s)] if len(result) > 0: for n in result: print(n) else: print((-1,-1))
Seems like cookies are disabled on this browser, please enable them to open this website
Re.start() & Re.end()
You are viewing a single comment's thread. Return to all comments →