title: Python fill matrix with specific values
body: <p>I have 2D matrix and I want to fill it with 0 and 1. And I have a list include some value. </p>
  
  <p>For example:</p>
  
  <pre><code>values = [1, 3, 5, 8]
  </code></pre>
  
  <p>and I want to create this matrix</p>
  
  <pre><code>matrix = [[0, 1, 0],
            [1, 0, 1],
            [0, 0, 1]]
  </code></pre>
  
  <p>I made this with two nested for loop witf if statement. Values is random integers from 0 to 100. And my matrix will be 10*10. Is there any way to create this more elegant?</p>