title: simple 2d input in python
body: <p>I need to input 2d array and make changes in it but the answer is always wrong. This is my code.</p>
  <pre><code>r,c,obs = map(int, input().split())
  k = []
  h = []
  for i in range(r):
      for j in range(c):
          k.append(0)
      h.append(k)
  
  for i in range(r):
      for j in range(c):
          print(h[i][j],end=&quot; &quot;)
      print()
  
  while obs &gt; 0:
      l, k = map(int, input().split())
      h[l-1][k-1] = 1
      obs -= 1
  
  for i in range(r):
      for j in range(c):
          print(h[i][j],end=&quot; &quot;)
      print()
  </code></pre>
  <p>My input is this -</p>
  <pre><code>5 4 4
  3 2
  3 4
  4 2
  5 2
  </code></pre>
  <p>According to the code my resultant matrix should be something like this -</p>
  <pre><code>0 1 0 0 
  0 1 0 0 
  0 1 0 1 
  0 0 0 0 
  0 0 0 0
  </code></pre>
  <p>But it is always resulting to this -</p>
  <pre><code>0 1 0 1 
  0 1 0 1 
  0 1 0 1 
  0 1 0 1 
  0 1 0 1
  </code></pre>
  <p>Can anyone tell me what is wrong here??</p>