python实现99乘法表

def test():
    row = 1
    while row <= 9:
        col = 1
        while col <= row:
            print("%d * %d = %d" % (col, row, col * row), end="\t")
            col += 1
        print("")
        row += 1


if __name__ == "__main__":
    test()

你可能感兴趣的:(python实现99乘法表)