一行代码实现9*9乘法表
# for i in range(1, 10): # for j in range(1, i + 1): # print('%s * %s = %s ' % (i, j, i * j), end='') # print() [print('%s * %s = %s\n' % (i, j, i * j)) if i == j else print('%s * %s = %s ' % (i, j, i * j), end='') for i in range(1, 10) for j in range(1, i + 1)]