```
class Solution(object):
def generate(self, numRows):
rows = [[1] for x in range(numRows)]
for i in range(1,numRows):
rows[i] += [ rows[i - 1][x] + rows[i - 1][x - 1] for x in range(1, i)] + [1]
return rows
class Solution(object):
def generate(self, numRows):
rows = []
for i in range(numRows):
rows += [1],
if i == 0:
continue
else:
rows[-1] += [ rows[-2][x] + rows[-2][x - 1] for x in range(1, i)] + [1]
return rows
```