__author__ = 'ZFH'#-*- coding:utf-8 -*-for i in range(10): #外层循环,range(10),1-9 for j in range(1,i+1): #内层循环,每次循环从1开始到每一次的外层循环 print('%s * %s = %s ' % (j,i,i*j),end='') #打印 print()