In this post, we will solve HackerRank Tweets HackerRank Solution. This problem (HackerRank Tweets) is a part of HackerRank Regex series.
Solution – HackerRank Tweets – HackerRank Solution
import re p = re.compile('((h|H)(a|A)(c|C)(k|K)(e|E)(r|R)(r|R)(a|A)(n|N)(k|K))') t = int(input()) c = 0 for i in range(t): x = str(input()) c += len(re.findall(p, x)) print(c)
Note: This problem (HackerRank Tweets) is generated by HackerRank but the solution is provided by CodingBroz. This tutorial is only for Educational and Learning purpose.