a = 1while a <= 9: b = 1 while b <= a: print("%d*%d=%d " % (b, a, a * b), end="") b += 1 print("") a += 1