from itertools import product
for i, j in product(range(1, 10), repeat=2):
    print('{}x{}={}'.format(i, j, i * j)) from itertools import product for i, j in product(range(1, 10), repeat=2):
    print('{}x{}={}'.format(i, j, i * j)) i j product(range(1, 10), repeat=2) product range(1, 10) range 1 10 repeat=2 repeat 2 print('{}x{}={}'.format(i, j, i * j)) print '{}x{}={}'.format(i, j, i * j) '{}x{}={}'.format '{}x{}={}' format i j i * j i j
from itertools import product
for i, j in product(range(1, 10), repeat=2):
    print('{}x{}={}'.format(i, j, i * j))