```
def generate(self, numRows):
if numRows == 0:
return []
pascal = [[1]]
for i in range(1, numRows):
pascal.append([1])
for j in range(1,i):
pascal[i].append(pascal[i-1][j] + pascal[i-1][j-1])
pascal[i].append(1)
return pascal
```