a = 1 n = 1 for a in range(1, 10): for n in range(1, 10): if n>a: continue c = a * n print("%d*%d=%2d" % (a, n, c), end=" ") print()
print("\n".join("\t".join(["%s*%s=%s" %(x,y,x*y) for y in range(1, x+1)]) for x in range(1, 10)))