python推导乘法口诀表源码如下:
#推导乘法口诀表 print('\n'.join(['\t'.join(['{}×{}={}'.format(j,i,j*i) for j in range(1, i+1)]) for i in range(1,10)]))
python推导乘法口诀表截图如下:
python用for循环打印乘法口诀表:
for x in range(1,10): for y in range(1,x+1): print('{}+{}={}\t'.format(x,y,x+y),end='') print()
原文链接:https://www.sobuer.com/server/499,转载请注明出处。
评论0