Ngô Quốc Huy
New member
What will be the output of the following Python code?
A. {(3, 4), (1, 2)}
B. Error
C. {(4, 2), (3, 1), (4, 1), (5, 2)}
D. {(3, 1), (4, 2)}
Code:
s1={3, 4}
s2={1, 2}
s3=set()
i=0
j=0
for i in s1:
for j in s2:
s3.add((i,j))
i+=1
j+=1
print(s3)
B. Error
C. {(4, 2), (3, 1), (4, 1), (5, 2)}
D. {(3, 1), (4, 2)}