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
|
872 Discussions
|
Please Login in order to post a comment
Here another slightly different approach:
a=list(map(int,input().split())) b=list(map(int,input().split())) for x in a : for y in b: c=(x,y) print(c,end=' ')
from itertools import product A =list (map(int,input().split())) B =list( map(int,input().split())) print (*product(A,B))