adplus-dvertising
frame-decoration

Question

What is the output of the following piece of code?
>>> a={3,4,5}
>>> b={5,6,7}
>>> a|b

a.

Invalid operation

b.

{3, 4, 5, 6, 7}

c.

{5}

d.

{3,4,6,7}

Posted under Python

Answer: (d).{3,4,6,7}

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following piece of code?