Suppose I have a vector `a`

which contains emails of different users:

`a = ('rahul.kumar@gmail.com','akashaggarwal123@gmail.com','ank.mishra@gmail.com','kumar.rahul96@gmail.com','rahulganotra@yahoo.com')`

I tried writing a code to run a for loop on this vector to identify similar emails using the python fuzzywuzzy library and obtain the required output:

> email = []

`for i in range(0,len(a)): for j in range(i+1,len(a)): if(fuzz.token_sort_ratio(a[i],a[j]) >83): email.append(a[i], a[j])`

But this obviously doesn’t work.

I want to append the similar emails in `email[]`

as:

I know there must be some way for this, i just can’t figure it out. If anyone could help me out with this?