cow = 1 定义行号 k while cow < 10: col = 1 while col <= cow: print '%d*%d\t' %(cow,col), 加逗号不换行 col += 1 print '' 换行 cow += 1