HackerRank Python - Validating and Parsing Email Addresses
Given n pairs of names and email addresses as input, print each name and email address pair having a valid email address on a new line.
- # Enter your code here. Read input from STDIN. Print output to STDOUT
-
- import re
-
- for _ in range(int(input())):
- name, email = input().split(' ')
- if re.match(pattern, email):
- print(name, email)