title: Python: TypeError: list indices must be integers, not str
body: <p>I'm going to do Matrix Addition on Python.(Not finish). But it shows an error.</p>
  
  <pre><code>m, n = (int(i) for i in raw_input().split())
  a = [[0 for i in range(m)] for j in range(n)]
  b = [[0 for i in range(m)] for j in range(n)]
  c = []
  total = []
  
  for i in range(m):
      x = raw_input()
      for j in range(n):
          value = [int(i) for i in x.split()]
      c[i][j] = a[i][j]
      #c.append(value)
  print a
  for i in c:
      print i
  </code></pre>
  
  <hr>
  
  <p>I want to input</p>
  
  <p>3 3  &lt;-- matrix dimensional m*n</p>
  
  <p>1 2 3  ></p>
  
  <p>3 2 1  > matrix A</p>
  
  <p>1 3 2  ></p>
  
  <p>1 1 1   ></p>
  
  <p>1 1 1   > matrix B</p>
  
  <p>1 1 1   ></p>
  
  <p>and shows as</p>
  
  <p>2 3 4 ></p>
  
  <p>4 3 2 > matrix A + B</p>
  
  <p>2 4 3 ></p>