Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
7-liner: set concept solution in Clear category for Unique Email Addresses by Stensen
def unique_emails(emails: list[str]) -> int:
mails = set()
for email in emails:
l, r = email.replace(".", "").split("@")
if "+" in l: l, _ = l.split("+")
mails.add(l + "@" + r)
return len(mails)
Nov. 25, 2021