You are viewing a single comment's thread. Return to all comments →
In python 2:
from itertools import product A = map(int,raw_input().split()) B = map(int,raw_input().split()) A.sort() B.sort() ans = [A,B] AxB = list(product(*ans)) for i in AxB: print i,
Seems like cookies are disabled on this browser, please enable them to open this website
itertools.product()
You are viewing a single comment's thread. Return to all comments →
In python 2: