# To print a diamond of numbers
# Set your font type As Courier
n=int(raw_input("Enter a number"))
n=(n)/2
w=n
for i in range(1,n+2) :
for j in range(w,0,-1) :
print " ",
w=w-1
for k in range(1,i) :
print k,
for l in range(i,0,-1) :
print l,
print
for i in range(n,-1,-1) :
for j in range(0,w+2) :
print " ",
w=w+1
for k in range(1,i) :
print k,
for l in range(i,0,-1) :
print l,
print
# Set your font type As Courier
n=int(raw_input("Enter a number"))
n=(n)/2
w=n
for i in range(1,n+2) :
for j in range(w,0,-1) :
print " ",
w=w-1
for k in range(1,i) :
print k,
for l in range(i,0,-1) :
print l,
for i in range(n,-1,-1) :
for j in range(0,w+2) :
print " ",
w=w+1
for k in range(1,i) :
print k,
for l in range(i,0,-1) :
print l,
Output
Enter a number 9
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1