You are viewing a single comment's thread. Return to all comments →
Python 3, input from STDIN
from itertools import product import sys arr = [] for line in sys.stdin.readlines(): i = map(int, line.split()) arr.append(i) for i in product(*arr): print(i, 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 →
Python 3, input from STDIN