Saying Hi – HackerRank Solution

In this post, we will solve Saying Hi HackerRank Solution. This problem (Saying Hi) is a part of HackerRank Regex series.

Saying Hi – HackerRank Solution

Python

n = int(input())
import re
p = re.compile('^[Hh][Ii]\s[^dD].*')
for i in range(n):
    x = str(input())
    if(len(re.findall(p, x)) > 0):
        print(x)

Note: This problem (Saying Hi) is generated by HackerRank but the solution is provided by CodingBroz. This tutorial is only for Educational and Learning purpose.

Leave a Comment

Your email address will not be published. Required fields are marked *