We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Itertools
- itertools.product()
- Discussions
itertools.product()
itertools.product()
Sort by
recency
|
844 Discussions
|
Please Login in order to post a comment
from itertools import product
A = [int(a) for a in input().split()] B = [int(b) for b in input().split()]
AxB = list(product(A,B)) print(*AxB)
from itertools import product
a = map(int,input().split()) b = map(int,input().split()) c = list(product(a,b))
print(" ".join(map(str,c)))