使用while循环 i = 1 j = 1 while i <= 9: j = 1 while j <= i: print(j,"*",i,"=",i*j,end=" ") j += 1 i += 1 print() 使用for循环 for i in range(1,10,1): for j in range(1,i+1,1): print(j,"*",i,"=",i*j,end=" ") print()