I am text mining from documents trying to collect company names from their annual reports using BeautifulSoup in Python. Am storing the collected names in a list, but I also am collecting duplicate names. I want to remove the duplicates from the list so that I have only unique company names. The names are of 3-4 words each. I tried using set() and similar looping techniques but it gives me a list of unique characters, not names. Please suggest a way to solve this issue.
newlist = []
for i in etfname:
if i not in newlist:
newlist.append(i)
print(newlist)
Screenshot