乘法表:
i = 1while i <= 9: print(i,end=": ") j = 1 while j <= i: print("%d*%d=%d" %(i,j,i*j),end=" ") j += 1 i += 1 print()运行结果