You are viewing a single comment's thread. Return to all comments →
Here's my code:
from re import finditer s, k = input().strip(), input().strip() print(*[(m.start(1), m.end(1) - 1) for m in finditer(f'(?=({k}))', s)] 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 →
Here's my code: