You are viewing a single comment's thread. Return to all comments →
import re S = input() K = input() matches = list(re.finditer(f'(?={K})', S)) if not matches: print((-1,-1)) else: for match in matches: print((match.start(),match.start() + len(K) - 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 →