You are viewing a single comment's thread. Return to all comments →
import re s, k = input(), input() idx = [(m.start(1), m.end(1) -1) for m in re.finditer(fr"(?=({k}))", s)] print(*idx or [(-1, -1)], sep="\n")
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 →