You are viewing a single comment's thread. Return to all comments →
from itertools import product
l1 = input().split(" ") l3 = [] for i in l1: l3.append(int(i))
l2 = input().split(" ") l4 = [] for i in l2: l4.append(int(i))
for pair in product(l3, l4): print(pair, end= " ")
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 →
from itertools import product
l1 = input().split(" ") l3 = [] for i in l1: l3.append(int(i))
l2 = input().split(" ") l4 = [] for i in l2: l4.append(int(i))
for pair in product(l3, l4): print(pair, end= " ")