You are viewing a single comment's thread. Return to all comments →
#!/bin/python3 import math import os import random import re import sys from typing import List def print_gmail(first_names: List[str], emails: List[str]): paired = dict(zip(emails, first_names)) filtered = dict(filter(lambda data: "@gmail.com" in data[0], paired.items())) ordered_name = [] ordered_email = [] for name in filtered.values(): ordered_name.append(name) ordered_name.sort() for name in ordered_name: print(name) if __name__ == '__main__': N = int(input().strip()) names = [] emails = [] for N_itr in range(N): first_multiple_input = input().rstrip().split() firstName = first_multiple_input[0] names.append(firstName) emailID = first_multiple_input[1] emails.append(emailID) print_gmail(names, emails)
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 →