#coding=utf-8
#左下三角格式输出九九乘法表
for i in range(1,10):
for j in range(1,i+1):
print "%d*%d=%2d" % (i,j,i*j),
print (" ")
'''
#杜云峰代码
n = 1
m = 2
while n<10:
print '\n'
for temp in range(1,m):

print '%d*%d=%d'%(n,temp,n*temp),

n+=1
m+=1

#左上三角格式输出九九乘法表
for i in range(1,10):
for j in range(i,10):
print "%d*%d=%2d" % (i,j,i*j),
print("")

#右上三角格式输出九九乘法表
for i in range(1,10):
for k in range(1,i):
pass
for j in range(i,10):
print "%d*%d=%2d" % (i,j,i*j),
print("")

#右下三角格式输出九九乘法表
for i in range(1,10):
for k in range(1,10-i):
pass
for j in range(1,i+1):
product=i*j#——给i*j的积赋一个变量
print "%d*%d=%2d" % (i,j,product),
print (" ")
#完整格式输出九九乘法表
for i in range(1,10):
for j in range(1,10):
print "%d*%d=%2d" % (i,j,i*j),
print("")
'''