class Solution:
    def numUniqueEmails(self, emails):
        """
        :type emails: List[str]
        :rtype: int
        """
        #my code
        str_set = set()
        for str_email in emails:
            localname, _, domainname = str_email.partition('@')
            name = localname.split('+')[0].replace('.', '') + '@' + domainname
            str_set.add(name)
        return len(str_set)
        #best code
        seen = set()  # unique strings
        for email in emails:
            # partition email into local and domain parts by "@" sign
            local, _, domain = email.partition("@")
            if '+' in local:
                local = local[:local.index('+')]
            seen.add(local.replace('.', '') + '@' + domain)
        return len(seen)
151e15cde755b146cff3506b98b62ff7bd43d076
<mask token>

class Solution:
    <mask token>

class Solution:

    def numUniqueEmails(self, emails):
        """
        :type emails: List[str]
        :rtype: int
        """
        str_set = set()
        for str_email in emails:
            localname, _, domainname = str_email.partition('@')
            name = localname.split('+')[0].replace('.', '') + '@' + domainname
            str_set.add(name)
        return len(str_set)
        seen = set()
        for email in emails:
            local, _, domain = email.partition('@')
            if '+' in local:
                local = local[:local.index('+')]
            seen.add(local.replace('.', '') + '@' + domain)
        return len(seen)

class Solution:
    def numUniqueEmails(self, emails):
        """
        :type emails: List[str]
        :rtype: int
        """
        #my code
        str_set = set()
        for str_email in emails:
            localname, _, domainname = str_email.partition('@')
            name = localname.split('+')[0].replace('.', '') + '@' + domainname
            str_set.add(name)
        return len(str_set)
        #best code
        seen = set()  # unique strings
        for email in emails:
            # partition email into local and domain parts by "@" sign
            local, _, domain = email.partition("@")
            if '+' in local:
                local = local[:local.index('+')]
            seen.add(local.replace('.', '') + '@' + domain)
        return len(seen)