parameters: (self, grid)
return_statement: return result
docstring: :type grid: List[List[int]]
          :rtype: int
docstring_summary: :type grid: List[List[int]]
          :rtype: int
docstring_tokens: : type grid : List [ List [ int ]] : rtype : int
function: def countNegatives(self, grid):
          """
          :type grid: List[List[int]]
          :rtype: int
          """
          result, c = 0, len(grid[0])-1
          for row in grid:
              while c >= 0 and row[c] < 0:
                  c -= 1
              result += len(grid[0])-1-c
          return result
function_tokens: def countNegatives ( self , grid ) : result , c = 0 , len ( grid [ 0 ] ) - 1 for row in grid : while c >= 0 and row [ c ] < 0 : c -= 1 result += len ( grid [ 0 ] ) - 1 - c return result