#!/usr/bin/env python# 9 * 9for 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)]))