You are viewing a single comment's thread. Return to all comments →
Python 3
import re test_string = '\n'.join([input() for _ in range(int(input()))]) for _ in range(int(input())): uk_word = input() us_word = re.sub(r'our', 'or', uk_word) print(len(re.findall(f'\\b({us_word}|{uk_word})\\b', test_string)))
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 →
Python 3