You are viewing a single comment's thread. Return to all comments →
python 3
import re pattern = re.compile(r'\w*[#@]?(hackerrank)\w*',re.IGNORECASE)
n =int(input()) count = 0
for _ in range(n): text = input() if re.search(pattern, text): count = count + 1 print(count)
Seems like cookies are disabled on this browser, please enable them to open this website
HackerRank Tweets
You are viewing a single comment's thread. Return to all comments →
python 3
import re pattern = re.compile(r'\w*[#@]?(hackerrank)\w*',re.IGNORECASE)
n =int(input()) count = 0
for _ in range(n): text = input() if re.search(pattern, text): count = count + 1 print(count)