# Unique Email Addresses (Leetcode 929)

Problem Link: <https://leetcode.com/problems/unique-email-addresses/>

```python
class Solution:
    def numUniqueEmails(self, emails: List[str]) -> int:
        d={}
        for i in emails:
            for idx in range(len(i)):
                if(i[idx]=="@"):
                    lname=i[:idx]
                    dname=i[idx+1:]
                    break
            for idx in range(len(lname)):
                if(lname[idx]=="+"):
                    lname=lname[:idx]
                    break
            for idx in range(len(lname)):
                if(idx<len(lname) and lname[idx]=="."):
                    lname=lname[:idx]+lname[idx+1:]
            email=lname+"@"+dname
            if(email not in d):
                d[email]=1
            else:
                d[email]+=1
        
        return len(d)
```
