str()函數(shù)
在字符串中使用整數(shù)時囚灼,需要顯式地將這個整數(shù)用作字符串丽惶。即調(diào)用?str()?函數(shù)
\t 制表符 ? ?end="" 不換行
x= 1
while x<=9:
? ? y = 1? ?
? ? while y <= x:
? ? ? ? print(? str(y)+"*"+ str(x) +"="+str(y * x), end="\t")
? ? ? ? y += 1? ?
? ? print()
? ? x += 1