# for循环实现乘法口诀表
for i in range(1, 10):
for j in range(1, i+1):
print("%d * %d = %d " % (j, i, i * j), end="") # end = ""保证每一行输出不换行
if j == i:
print("") # 每一行输出最后一组乘法时换行
j = j + 1
i = i + 1
# for循环实现乘法口诀表
for i in range(1, 10):
for j in range(1, i+1):
print("%d * %d = %d " % (j, i, i * j), end="") # end = ""保证每一行输出不换行
if j == i:
print("") # 每一行输出最后一组乘法时换行
j = j + 1
i = i + 1