for n in range(1,10):
for i in range(1,10):
if i>n:
break
print(f"{n}*{i}={n*i}", end="\t")
print()
结果如下图:
for n in range(1,10):
for i in range(1,10):
if i>n:
break
print(f"{n}*{i}={n*i}", end="\t")
print()
结果如下图: