r/learnpython•
IonRed

Matching array objects.

Hey guys, here is what I am trying to accomplish.

I have the following data set:

Array[1] = ['1', '7', '5', '3', '10', '15']
Array[2] = ['1', '7', '5', '3', '10', '23']

basically what I am trying to accomplish is to match the object in array[1] to array[2] so in this example there are 5 objects that match, so it should return 5.

These objects will always change and the length of the arrays will be anywhere from 50-100 objects per array.

What is the best way to go about doing this?

Posted Jan 16, 2016, 7:22 PM UTC

218
Loading comments…