You are viewing a single comment's thread. Return to all comments →
import re s=input() k=input() flag=False for i in re.finditer(rf'(?=({k}))',s): #print(i.group(1)) print((i.start(1),i.end(1)-1)) flag=True if not flag: 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 →