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

posted on 2018-08-23 14:39  这个有点难诶  阅读(1819)  评论(1编辑  收藏  举报

导航