Advertisement
kosievdmerwe

Untitled

Sep 27th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. class Solution:
  2.     def numUniqueEmails(self, emails: List[str]) -> int:
  3.         raw_emails = set()
  4.         for email in emails:
  5.             localname, domain = email.split("@", 1)
  6.             localname = localname.replace(".", "")
  7.             localname = localname.split("+", 1)[0]
  8.             raw_emails.add((localname, domain))
  9.         return len(raw_emails)
  10.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement