Answers for "how to compare 2 lists in python with values index"

0

How to compare two lists and return the number of times they match at each index in python

>>> list1 = [1,1,0,1,0,1]
>>> list2 = [0,1,0,1,1,0]
>>> sum(a == b for a,b in zip(list1, list2))
3
Posted by: Guest on December-29-2020

Code answers related to "how to compare 2 lists in python with values index"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language