title: Compare a list of lists and display result using OpenCV
body: <p>I have two list of lists that I want to compare element by element first.</p>
  <pre><code>a=[[0,0,0,0,3],[1,2]]  # This is the key (list of list)
  b=[[0,0,0,2,3],[1,0]]  # This is the list of list I want to compare against the key list
  </code></pre>
  <p>I also have an image that has 5 rows (first rectangle) (because <code>a[0]</code> has 5 elements) and 2 rows (second rectangle) (because <code>a[1]</code> has 2 elements)</p>
  <p><a href="https://i.stack.imgur.com/grpKu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/grpKu.jpg" alt="Main Image" /></a></p>
  <p>For the following image, I know the corner points and the height of each individual rows. These are stored in another list. <code>xyh=[[115,60,70],[350,55,70]]</code></p>
  <p>What I would like to do is compare my list <code>b</code> against <code>a</code> and if they match eg <code>a[0][0]=b[0][0]</code> then the text &quot;match&quot; will be displayed in the first first column's first row, if they don't match then the element from the list <code>a</code> will be displayed.</p>
  <p>This is the expected result at the end.</p>
  <p><a href="https://i.stack.imgur.com/R8g1R.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R8g1R.jpg" alt="Expected result" /></a></p>
  <p>My MWE:</p>
  <pre><code>import cv2
  import numpy as np
  
  total_elements=7
  a=[[0,0,0,0,3],[1,2]]  # This is the key (list of list)
  b=[[0,0,0,2,3],[1,0]]  # This is the list of list I want to compare against the key list
  xyh=[[115,60,70],[350,55,70]] # List for the top-right corner points of the columns and the height of each rows.
  
  img=img=cv2.imread('1.jpg')
  imgFinal=img.copy()
  
  # How do I loop over all three list of lists and then display the result in imgFinal?
  
  
  
  
  
  
  cv2.imshow('Expected Result',imgFinal)
  </code></pre>