x = 1 while x < 10: y = 1 while y <= x: print(‘ {} * {} = {}‘.format(y,x,y*x),end=‘‘) y += 1 print() x += 1
还有更简单的写法吗?
用Python写的九九乘法表
原文:https://www.cnblogs.com/sdzycw/p/11670959.html