You are viewing a single comment's thread. Return to all comments →
I didn't have to use regex for this but I chose to just to be fair to myself:
#!/bin/python3 import sys import re N = int(input().strip()) db = [input().split() for _ in range(N)] gmails = re.compile(r'@gmail\.com') names = sorted([entry[0] for entry in db if re.search(gmails, entry[1])]) print(*names, sep='\n')
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 →
I didn't have to use regex for this but I chose to just to be fair to myself: