title: TypeError: can only concatenate list (not "int") to list in python
body: <p>I tried to run this code, but it showed an error:</p>
  
  <pre><code>def shoot(aliens):
  
      s=[0]*1000
      s[0]=0
      s[1]=1
      num=len(aliens)
      b=[[0 for m in range(1000)] for n in range(1000)]
      for j in xrange(2,num):
          for i in xrange(0,j):
  
                  b[j][i]=s[i]+min(int(aliens[j]),f[j-i]) ##Error here
          s[j]=max(b)
  </code></pre>
  
  <p>and the error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "module1.py", line 67, in &lt;module&gt;
  print shoot(line)
  File "module1.py", line 26, in shoot
  b[j][i]=s[i]+min(int(aliens[j]),f[j-i])
  TypeError: can only concatenate list (not "int") to list
  </code></pre>
  
  <p>please help!</p>
  
  <p>Edit: added more code. s, aliens and f are other arrays. I tried to save the result to the 2 dimentional array, but it showed that error.</p>