1.九九乘法表
s="" for i in range(1,10): for j in range(1,i+1): s+=str(i)+"*"+ str(j)+"="+str(i*j)+"\t" print(s) s=""
2.print() <==不换行
for i in range(1,10): print(i,end=" ")
for i in range(1,10):
print(i,end=" ",sep="-")
eng默认“\n”,sep表分隔符
原文地址:https://www.cnblogs.com/2018-1025/p/9902489.html
时间: 2024-10-09 06:42:08