Python-Quizzes | Python Sets Quiz | Question 7

Last Updated :
Discuss
Comments

What is the output of the following program?

Python
set1 = {0, 2, 4, 6, 8}; 
set2 = {1, 2, 3, 4, 5}; 


print(set1 & set2) 

{0, 1, 2, 3, 4, 5, 6, 8}

{0, 1, 3, 5, 6, 8}

{2, 4}

{0, 8, 6}

Share your thoughts in the comments