# Work hard and try again.Done is better than perfect.
for i in range(1,10):
for j in range(1,i + 1):
result = j * i
print(j,"*",i,"=",result,‘\t‘,end=‘‘) # end=‘‘ 起连接作用 ‘\t‘ 制表符,使得格式对齐
print(‘‘) # 空格print(‘‘) 表示换行
执行结果:
原文:https://www.cnblogs.com/zx1313/p/14728163.html