title: string indices must be integers Battle ships codewars kata
body: <p>Im getting this error when inputting my code in codewars. "Traceback:in module
     in damaged_or_sunk
  IndexError: list index out of range". However, when I try my code in spyder3, it works just fine. there are no indicators as to where this error is in the function damaged_or_sunk though.</p>
  
  <pre><code>def damaged_or_sunk (board, attacks):        
      a = sum(x.count(1) for x in board)
      b = sum(x.count(2) for x in board)
      c = sum(x.count(3) for x in board) 
      a1 = 0
      b1 = 0
      c1 = 0               
      points = 0
      sunk = 0
      damaged = 0
      not_touched = 0
  
  
      for each in attacks:
          rand_row = each[0]
          rand_col = each[1]
  
          if board[rand_row][rand_col] == 1:
              a1 += 1
          elif board[rand_row][rand_col] == 2:
              b1 += 1
          elif board[rand_row][rand_col] == 3:
              c1 += 1
          else:
              pass
  
      if a1 == a:
          points += 1
          sunk += 1
      elif a1 == 0:
          points -= 1
          not_touched += 1
      else:
          points += 0.5
          damaged += 1
  
      if b1 == b:
          points += 1
          sunk += 1
      elif b1 == 0:
          points -= 1
          not_touched += 1
      else:
          points += 0.5
          damaged += 1
  
      if c1 == c:
          points += 1
          sunk += 1
      elif c1 == 0:
          points -= 1
          not_touched += 1
      else:
          points += 0.5
          damaged += 1    
  
      return '{\'sunk\': %s, \'damaged\': %s, \'not_touched\': %s, \'points\': %s}' %(sunk, damaged, not_touched, points)
  </code></pre>