title: Pascal triangle every single line became the same - python
body: <p>this is my first question on Stackflow.
  I want to create a pascal triangle with height of 'n'.
  Here is my code:</p>
  
  <pre><code>nb = input('input lines: ')
  nb = int(nb)
  array = [([1]+[0]*(nb-1))]*nb
  for i in range(1, nb):
      for j in range(1 ,nb):
          array[i][j] = array[i-1][j-1] + array[i-1][j]
  </code></pre>
  
  <p>I want to get:</p>
  
  <pre><code>[1, 0, 0, 0, 0]
  [1, 1, 0, 0, 0]
  [1, 2, 1, 0, 0]
  [1, 3, 3, 1, 0]
  [1, 4, 6, 4, 1]
  </code></pre>
  
  <p>But the result is like this:</p>
  
  <pre><code>input lines: 5
  [1, 4, 10, 20, 35]
  [1, 4, 10, 20, 35]
  [1, 4, 10, 20, 35]
  [1, 4, 10, 20, 35]
  [1, 4, 10, 20, 35]
  </code></pre>
  
  <p>I don't understand why every single line changed to the same. Especially I started the recursion from the second element in the second line.</p>
  
  <p>Could someone explain the issue with my code.
  Thanks a lot </p>