Python3输出九九乘法表

for i in range(1,10):
    for j in range(1,i+1):
        print('{}x{}={}\t'.format(i, j, i*j), end='') #format格式对齐
    print()  #在输出下一行时换行

 

posted @ 2018-05-12 11:01  heheheda  阅读(443)  评论(0编辑  收藏  举报