# coding:utf-8 # form_future_import print_function //在python2中引入python3中print函数的语法的语句 # 1.总共有9列 # 2.每行中的列数,就是当前的行号 # 3.乘式的第一个数代表得是列,第二个数代表行 row = 1 column = 1 while row <= 9: while column <= row: print('%d*%d=%d '%(column,row,column*row),end='') # end=''//表示不让换行 column += 1 print('') column = 1 row += 1