for i in range(1,10): print ' '.join(map(lambda x:"%d x %d = %d"%(x,i,i*x),range(1,i+1)))
N = 8 for i in range(N): if i < N/2: print ' '*(N-1-i)+'*'*(1+2*i)+' '*(N-1-i) else: print ' '*i+'*'*(2*(N-1-i)+1)+' '*i