title: Comparing one list with list of list and replace values
body: <p>I have a list of list x which looks like this</p>
  <pre><code>[[3,6,7,8],
  [2,4,5,7],
  [4,5,8,10]]
  </code></pre>
  <p>and i have another list with 10 elements</p>
  <pre><code>y=[1,2,3,4,5,6,7,8,9,10]
  </code></pre>
  <p>i want to update x based on y so that it look like</p>
  <pre><code>[[0,0,1,0,0,1,1,1,0,0],
  [0,1,0,1,1,0,1,0,0,0],
  [0,0,0,1,1,0,0,1,0,1]]
  </code></pre>
  <p>my code looks like this</p>
  <pre><code>newlst3=[]
  for x in range(10):
      newlst3.append(0)
  
  for x in newlst:
      newlst3[x]=1
  </code></pre>
  <p>my code only does it for a single list but not for a list of lists</p>