All, I want to delete specific array elements of one array from the other. Here is an example. The arrays are a long list of words though.
A = ['at','in','the']
B = ['verification','at','done','on','theresa']
I would like to delete words that appear in A from B.
B = ['verification','done','theresa']
Here is what I tried so far
for word in A:
for word in B:
B = B.replace(word,"")
I am getting an error:
AttributeError: 'list' object has no attribute 'replace'
What should I use to get it?