You are viewing a single comment's thread. Return to all comments →
import re n=int(input()) text=" ".join(input() for _ in range(n)) b=int(input()) for _ in range(b): i=input() matches=re.findall(fr"(?<=\w){re.escape(i)}(?=\w)",text) print(len(matches))
Seems like cookies are disabled on this browser, please enable them to open this website
Find A Sub-Word
You are viewing a single comment's thread. Return to all comments →