from itertools import product

for i, j in product(range(1,10), repeat=2):
    print('%dx%d=%d' % (i, j, i*j)) from itertools import product for i, j in product(range(1,10), repeat=2):
    print('%dx%d=%d' % (i, j, i*j)) i j product(range(1,10), repeat=2) product range(1,10) range 1 10 repeat=2 repeat 2 print('%dx%d=%d' % (i, j, i*j)) print '%dx%d=%d' % (i, j, i*j) '%dx%d=%d' (i, j, i*j) i j i*j i j
from itertools import product

for i, j in product(range(1,10), repeat=2):
    print('%dx%d=%d' % (i, j, i*j))