<jupyter_start><jupyter_text>![avatar](118.jpg)<jupyter_code>给定一个非负整数numRows，则生成Pascal三角形的第一个numRows。

例1：
    Input: 5
    Output:
        [
             [1],
            [1,1],
           [1,2,1],
          [1,3,3,1],
         [1,4,6,4,1]
        ]<jupyter_output><empty_output><jupyter_text>class Solution:    def generate(self, numRows: int):        res = []        for row in range(numRows):            res.append([])            for i in range(row+1):                if i == 0 or i == row:                    val = 1                else:                    val = res[-2][i-1] + res[-2][i]                res[-1].append(val)        return res numRows_ = 7solution = Solution()solution.generate(numRows_)<jupyter_code>0
    0 1
   0 1 2
  0 1 2 3
 0 1 2 3 4
[[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1595744680851064, 'fraction_numerical': 0.06855791962174941, 'mean_word_length': 1.732258064516129, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '643784', 'license': 'Apache-2.0', 'n_tokens_mistral': 359, 'n_tokens_neox': 327, 'n_words': 73, 'path': "Array/0808/118. Pascal's Triangle.ipynb", 'repo_name': 'YuHe0108/Leetcode', 'size': '846'}