parameters: (self, numRows)
return_statement: return res
docstring: :type numRows: int
          :rtype: List[List[int]]
docstring_summary: :type numRows: int
          :rtype: List[List[int]]
docstring_tokens: : type numRows : int : rtype : List [ List [ int ]]
function: def generate(self, numRows):
          """
          :type numRows: int
          :rtype: List[List[int]]
          """
          res = []
          
          for i in range(numRows):
              row = []
              
              for j in range(i + 1):
                  if j == 0 or j == i:
                      row.append(1)
                  else:
                      val = res[-1][j - 1] + res[-1][j]
                      row.append(val)
                      
              res.append(row)
              
          return res
function_tokens: def generate ( self , numRows ) : res = [ ] for i in range ( numRows ) : row = [ ] for j in range ( i + 1 ) : if j == 0 or j == i : row . append ( 1 ) else : val = res [ - 1 ] [ j - 1 ] + res [ - 1 ] [ j ] row . append ( val ) res . append ( row ) return res