I have two lists. The first list contains values from the database; the second list contains a set of words from a file that came from the user.
list_with_name_in_BD = [
'LOPEZ TRANSPORT',
'LOPEZ TRANSPORTATION',
'Lopez Transport',
'napora inc',
'Narain Transport Ltd'
]
The total number of items in this list is about 300.000
list_with_words_in_file = [
'Description', 'llc', 'Load', 'Rate', 'Amount', '$1950.00',
'Please', 'BBE', 'note', 'Lopez transport', 'LLC'
]
The total number of elements in this list is about 1000
My task is to find the most similar (or completely identical) elements between two lists. That is, as you can see, there are no identical elements between the two lists (although they may be), but there are similar ones. So, at the output, I would like to get a list with the most similar (or identical elements) between the two lists. That is, the result should be as follows.
output = [
'Lopez Transport',
'LOPEZ TRANSPORT',
'LOPEZ TRANSPORTATION'
]
I will be grateful for any help and advice you can give me.