title: Merging two lists into another list in Python
body: <p>Suppose I have two lists like this,</p>
  <pre><code>Ii = [[7,1],[7,5],[7,8],[5,8],[2,8],[3,5]]
  ci = [11,5,3,5,5,4]
  </code></pre>
  <p>Now I want to make another list (I) of m x n which will look like this,</p>
  <pre><code>I = 
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [11, 0, 0, 0, 5, 0, 0, 3, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 5, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 4, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 5, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  </code></pre>
  <p>I tried this code,</p>
  <pre><code>m,n = 8,10    
  I = [[0 for j in range(n)] for i in range(m)]
      for i, j in Ii:
          I[m - i][j - 1] = 1
  </code></pre>
  <p>Which have an output looks like this,</p>
  <pre><code>I = 
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [1, 0, 0, 0, 1, 0, 0, 1, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  </code></pre>
  <p>Now I have 1 where I wanted the values of ci. But I want to put the values of ci in the places of 1. Need help regarding how can I do this?</p>