You are viewing a single comment's thread. Return to all comments →
My solution for this in Python 3:
import re re_pattern = r'^[H,h]{1}[I,i]{1}[\s]{1}[^D,d]{1}' N = int(input()) for _ in range(N): line = input() matched = re.match(re_pattern, line) if bool(matched): print(line)
Seems like cookies are disabled on this browser, please enable them to open this website
Saying Hi
You are viewing a single comment's thread. Return to all comments →
My solution for this in Python 3: