__author__ = 'zht' #!/usr/bin/env python # -*- coding: utf-8 -*- ''' #努力学习每一天 ''' #while嵌套应用二:九九乘法表
i = 1 while i <= 9: j = 1 while j <= i: print("%d*%d=%-5d"%(j,i,i*j),end='') j +=1 print('\n') i+=1