You are viewing a single comment's thread. Return to all comments →
Using Python and RegEx
if __name__ == '__main__': N = int(input().strip()) res = [] pattern = re.compile(r'@gmail\.com$') for _ in range(N): firstName, emailID = input().strip().split() if pattern.search(emailID): res.append(firstName) for x in sorted(res): print(x)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 28: RegEx, Patterns, and Intro to Databases
You are viewing a single comment's thread. Return to all comments →
Using Python and RegEx