929. Unique Email Addresses
class Solution:
def numUniqueEmails(self, emails: List[str]) -> int:
unique_emails = set()
for email in emails:
local, domain = email.split('@')
local = local.split('+')[0] # Remove the part after '+'
local = local.replace('.', '') # Remove all '.'
unique_email = f"{local}@{domain}"
unique_emails.add(unique_email)
return len(unique_emails)