class Solution:
def numUniqueEmails(self, emails):
"""
:type emails: List[str]
:rtype: int
"""
a=[]
b=[]
count = 0
for ems in emails:
first = ems.split("@")[0].replace(".","").split("+")[0]
last = ems.split("@")[1]
email = first + "@" + last
a.append(email)
for i in range(len(a)):
if a[i] not in b:
b.append(a[i])
count += 1
return count
版权声明:本文为hustwayne原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。