#!/usr/bin/env python
#
9 * 9
for i in range(1, 10):
print
for j in range(1, i+1):
print "%d*%d=%d" % (i, j, i*j),

 

 

 

转:

 

print('\n'.join([ ' '.join([ "%d*%d=%2s" %(y,x,x*y) for y in range(1,x+1)]) for x in range(1,10)]))

 

 

posted on 2010-09-14 21:06  oyzway  阅读(1195)  评论(0编辑  收藏  举报