Answers for "python comparing two indexes in a list"

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 "python comparing two indexes in a list"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language