title: Python Set the matrix value of multiple row and each rows with multiple different columns without for loop
body: <p>How to set the same value to the matrix of multiple rows and each row with different column numbers without for loop?
  For example for matrix a:</p>
  
  <pre><code>a=matrix([[1,2,3],
            [8,2,9],
            [1,8,7]])
  
  row = [1,2,3]
  col = [[1,2]
         [1,3]
         [2,3]]  
  </code></pre>
  
  <p>I want to set a[1,1],a[1,2],a[2,1],a[2,3],a[3,2],a[3,3] to the same value.
  I know use for loop:</p>
  
  <pre><code>for i in xrange(len(row)):
      a[row[i],col[i]] = setvalue    
  </code></pre>
  
  <p>But is there anyway to do this without for loop?</p>