You are viewing a single comment's thread. Return to all comments →
import re text = '\n'.join([input() for _ in range(int(input()))]) words = [input() for _ in range(int(input()))] american = [re.sub(r"our", 'or', w) for w in words] print(*[len(re.findall(r"\b({}|{})\b".format(w, a), text, flags=re.M)) for w, a in list(zip(words, american))], sep='\n')
Seems like cookies are disabled on this browser, please enable them to open this website
UK and US: Part 2
You are viewing a single comment's thread. Return to all comments →