Issue
I have 2 array:
old_array = [[1,2,3],[4,5,6],[7,8,9]]
new_array = [[10,11,12],[1,2,3],[4,5,6],[13,14,15]]
is there an easy algoritm to remove the rows who are already in old_array from new_array, so that the value of new_array is eventually
new_array = [[10,11,12],[13,14,15]]
Solution
[i for i in new_array if i not in old_array]
Answered By - Darina
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.