for i in range(1,10): a='' for j in range(1,i+1): a=a+str(j)+'*'+str(i)+'='+str(i*j)+' ' print a每行都解释一下啊 还有str是啥意思
谢谢了 那str是干嘛的
把数字转化为字符串。。。