Using arrays with other arrays in Python.
- by Scott
Trying to find an efficient way to extract all instances of items in an array out of another.
For example
array1 = ["abc", "def", "ghi", "jkl"]
array2 = ["abc", "ghi", "456", "789"]
Array 1 is an array of items that need to be extracted out of array 2. Thus, array 2 should be modified to ["456", "789"]
I know how to do this, but no in an efficient manner.