Skip to content

Commit d1a05cb

Browse files
committed
Importing Product from Itertools, code updated to Python 3 Series. All the commented lines are Sample Inputs and Outputs
1 parent 4218d31 commit d1a05cb

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

itertools/itertools_product.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
__author__ = 'Sanjay'
2+
from itertools import *
3+
24
#
35
# Task
46
#
@@ -52,8 +54,10 @@
5254

5355
# (1, 3) (1, 4) (2, 3) (2, 4)
5456

55-
a=map(int,raw_input().split(" "))
56-
b=map(int,raw_input().split(" "))
57-
from itertools import product
58-
for i in list(product(a,b)):
59-
print i,
57+
58+
firstInput = list(map(int, input().split()))
59+
secondInput = list(map(int, input().split()))
60+
61+
62+
for i in list(product(firstInput, secondInput)):
63+
print(i,end="")

0 commit comments

Comments
 (0)