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
|
780 Discussions
|
Please Login in order to post a comment
arr1=list(map(int,input().split())) arr2=list(map(int,input().split()))
for i in range(len(arr1)): for j in range(len(arr2)): print((arr1[i], arr2[j]), end=" ") // IT'S WORK
m=map(int,input().split()) arr1=list(map(int,input().split())) n=map(int,input().split()) arr2=list(map(int,input().split()))
for i in range(len(arr1)): for j in range(len(arr2)): print((arr1[i], arr2[j]),sep="", end=" ") // MY CODE RUN SUCCESSFULLY BUT ALL THE TEST CASES ARE FAIL WHY
from itertools import product;
a = list(map(int, input().split())); b = list(map(int, input().split()));
x = list(product(a,b));
for i in x: print(i,end=" ");