HackerRank Python - itertools.product
You are given two lists and A and B. Your task is to compute their cartesian product AXB.
- # 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))