itertools.product()

  • + 0 comments
    a=list(map(int,input().split()))
    b=list(map(int,input().split()))
    
    li=[]
    for i in a:
        for j in b:
            li.append((i,j))
    
    for i in range(len(li)):
        print(li[i],end=" ")