Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution:
- def numUniqueEmails(self, emails: List[str]) -> int:
- raw_emails = set()
- for email in emails:
- localname, domain = email.split("@", 1)
- localname = localname.replace(".", "")
- localname = localname.split("+", 1)[0]
- raw_emails.add((localname, domain))
- return len(raw_emails)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement