itertools.product()

  • + 0 comments

    from itertools import product

    A = set(input().split()) A = list(sorted((map(int,A)))) B = set(input().split()) B = list(sorted((map(int,B))))

    def itertools_product(X,Y): for i in product(X,Y): print(i, end=' ')

    result = itertools_product(A,B)