hacker rank python(itertools.product())
ITERTOOLS.PRODUCT()
# Enter your code here. Read input from STDIN. Print output to STDOUT
from itertools import product
a = list(map(int, input().split()))
b = list(map(int, input().split()))
print(*product(a, b))
Comments
A = list(map(int, A))
B = raw_input().split()
B = list(map(int, B))
for i in product(A, B):
print i,