a = range(1, 10)
[print('{}x{}={}'.format(i, j, i * j)) for i in a for j in a] a = range(1, 10) a range(1, 10) range 1 10 print('{}x{}={}'.format(i, j, i * j)) for i in a for j in a for i in a for j in a i a for j in a j a for j in a print('{}x{}={}'.format(i, j, i * j)) print '{}x{}={}'.format(i, j, i * j) '{}x{}={}'.format '{}x{}={}' format i j i * j i j [print('{}x{}={}'.format(i, j, i * j)) for i in a for j in a] a = range(1, 10) range(1, 10) a
a = range(1, 10)
[print('{}x{}={}'.format(i, j, i * j)) for i in a for j in a]