You are viewing a single comment's thread. Return to all comments →
from itertools import product def get_coords(): coords = input() coords_tup = tuple(map(int, coords.split())) return coords_tup def cartesian_product(): coords_a = get_coords() coords_b = get_coords() return list(product(coords_a, coords_b)) cp = cartesian_product() print(*cp)
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 →