You are viewing a single comment's thread. Return to all comments →
import re s,k = [input() for _ in range(2)] p = r'(?=(%s))' % re.escape(k) print("\n".join("(%s, %s)"%(match.start(1),match.end(1)-1) for match in re.finditer(p, s)) or "(-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 →