# ! /usr/bin/env python # -*- coding:UTF-8 -*- line = '' for i in range(1, 10): line = '' for j in range(1, i+1): line += "| %d * %d = %2d " % (j, i, i * j) if j == i: line += "|" print('