You are viewing a single comment's thread. Return to all comments →
import re sentences = [] [sentences.append(input()) for i in range(int(input()))] for j in range(int(input())): theme = input()[::-1][2:][::-1] #chop se/ze a = re.compile(theme+'[sz]e') #variation US/UK count = 0 for i in sentences: count += re.findall(a,i).__len__() print(count)
Seems like cookies are disabled on this browser, please enable them to open this website
The British and American Style of Spelling
You are viewing a single comment's thread. Return to all comments →