I have a task of removing duplicate addresses from a list.
Case1: list of 5 addresses in which there are 2 only required and 3 are duplicated.
['3805 Swan House Ct||Burtonsville|MD|20866',
'3805 Swan House Ct||Burtonsville|Md|20866',
'6113 Loventree Rd||Columbia|MD|21044',
'6113 Loventree Rd||Columbia|Md|21044',
'6113 Loventree Road||Columbia|MD|21044']
Here address '3805 Swan House Ct||Burtonsville|MD|20866' and '3805 Swan House Ct||Burtonsville|Md|20866' are similar, hence here it should return any of address considering length, here '3805 Swan House Ct||Burtonsville|MD|20866' will be OK.
In case of '6113 Loventree' address variats- these are 3 address after comparing it should return '6113 Loventree Road||Columbia|MD|21044'
Expected Output:
['3805 Swan House Ct||Burtonsville|MD|20866','6113 Loventree Road||Columbia|MD|21044']
Case2: list of 3 address here only one address required to be extracted.
['4512 Fairfax Road|Apartment 2|Baltimore|MD|21216', '4512fairfaxrd|Apt2|Baltimore|Md|21216', '4512 Fairfax Rd|Apt 2|Baltimore|Md|21216']
expected output: considering the highest length of address.
['4512 Fairfax Road|Apartment 2|Baltimore|MD|21216']