```
class Solution:
# @return a list of lists of integers
def generate(self, numRows):
list = []
# if numRows == 0:
# return list
temp = []
for i in range(1, numRows + 1):
temp = [1 for val in range(i)]
if (i > 2):
for j in range (1, i - 1):
temp[j] = list[i-2][j-1] + list[i-2][j]
list.append(temp)
return list
```

My solution is above.