x = 1 while x < 10: y = 1 while y <= x: print(' {} * {} = {}'.format(y,x,y*x),end='') y += 1 print() x += 1
还有更简单的写法吗?