python中输出一个九九乘法表

second = 1
while second <= 9:
first = 1
while first <= second:
print("%d * %d =%2d " % (first, second, first * second)),# python2.7版本不换行输出格式,3.0版本为 print("%d * %d =%d " % (first, second, first * second), end=(""))

        first = first + 1 
print("")
second += 1
原文地址:https://www.cnblogs.com/qin5429/p/9523631.html