第一种(while循环):
i = 1
while i <= 9:
j = 1
while j <= i:
print(f"{j} * {i} = {j * i}\t", end='')
j += 1
i += 1
print()
第二种(for循环):
for i in range(1, 10):
for j in range(1, i + 1):
print(f"{j} * {i} = {j * i}\t", end='')
print()
第一种(while循环):
i = 1
while i <= 9:
j = 1
while j <= i:
print(f"{j} * {i} = {j * i}\t", end='')
j += 1
i += 1
print()
第二种(for循环):
for i in range(1, 10):
for j in range(1, i + 1):
print(f"{j} * {i} = {j * i}\t", end='')
print()