<doocs>0118.Pascal's Triangle_1.py
def generate( numRows: int) -> List[List[int]]:
    ans = []
    for i in range(numRows):
        t = [
            1 if j == 0 or j == i else ans[-1][j] + ans[-1][j - 1]
            for j in range(i + 1)
        ]
        ans.append(t)
    return ans
def sample_funcname ( var_0 : int ) -> List [ List [ int ] ] :
    var_3 = [ ]
    for var_5 in range ( var_0 ) :
        var_9 = [ 1 if var_6 == 0 or var_6 == var_5 else var_3 [ - 1 ] [ var_6 ] + var_3 [ - 1 ] [ var_6 - 1 ] for var_6 in range ( var_5 + 1 ) ]
        var_3.append ( var_9 )
    return var_3
