You are viewing a single comment's thread. Return to all comments →
Python 3
import re sentence = '\n'.join([input() for _ in range(int(input()))]) for _ in range(int(input())): print(len(re.findall(f'\\b({input()})\\b', sentence)))
Seems like cookies are disabled on this browser, please enable them to open this website
Find a Word
You are viewing a single comment's thread. Return to all comments →
Python 3