class Solution(object):
def generate(self, numRows):
"""
:type numRows: int
:rtype: List[List[int]]
"""
if not numRows:
return []
ln=[[1]]
la=[1]
for i in range(numRows-1):
lb=[1]
for j in range(1,len(la)):
lb.append(la[j]+la[j-1])
lb.append(1)
ln.append(lb[:])
la=lb[:]
return ln