Skip to main content
deleted 3 characters in body
Source Link
primo
  • 241
  • 2
  • 3

Python, 5956 Bytes

a=[1];exec"print a;a=map(int.__add__sum,zip([0]+a,a+[0]));"*input() 

Sample usage:

echo 9 | python filename.py 

Produces:

[1] [1, 1] [1, 2, 1] [1, 3, 3, 1] [1, 4, 6, 4, 1] [1, 5, 10, 10, 5, 1] [1, 6, 15, 20, 15, 6, 1] [1, 7, 21, 35, 35, 21, 7, 1] [1, 8, 28, 56, 70, 56, 28, 8, 1] 

Python, 59 Bytes

a=[1];exec"print a;a=map(int.__add__,[0]+a,a+[0]);"*input() 

Sample usage:

echo 9 | python filename.py 

Produces:

[1] [1, 1] [1, 2, 1] [1, 3, 3, 1] [1, 4, 6, 4, 1] [1, 5, 10, 10, 5, 1] [1, 6, 15, 20, 15, 6, 1] [1, 7, 21, 35, 35, 21, 7, 1] [1, 8, 28, 56, 70, 56, 28, 8, 1] 

Python, 56 Bytes

a=[1];exec"print a;a=map(sum,zip([0]+a,a+[0]));"*input() 

Sample usage:

echo 9 | python filename.py 

Produces:

[1] [1, 1] [1, 2, 1] [1, 3, 3, 1] [1, 4, 6, 4, 1] [1, 5, 10, 10, 5, 1] [1, 6, 15, 20, 15, 6, 1] [1, 7, 21, 35, 35, 21, 7, 1] [1, 8, 28, 56, 70, 56, 28, 8, 1] 
Source Link
primo
  • 241
  • 2
  • 3

Python, 59 Bytes

a=[1];exec"print a;a=map(int.__add__,[0]+a,a+[0]);"*input() 

Sample usage:

echo 9 | python filename.py 

Produces:

[1] [1, 1] [1, 2, 1] [1, 3, 3, 1] [1, 4, 6, 4, 1] [1, 5, 10, 10, 5, 1] [1, 6, 15, 20, 15, 6, 1] [1, 7, 21, 35, 35, 21, 7, 1] [1, 8, 28, 56, 70, 56, 28, 8, 1]