Examveda

What will be the output of the following Python code?
s1={1, 2, 3}
s2={3, 4, 5, 6}
s1.difference(s2)
s2.difference(s1)

A. {1, 2}
{4, 5, 6}

B. {1, 2}
{1, 2}

C. {4, 5, 6}
{1, 2}

D. {4, 5, 6}
{4, 5, 6}

Answer: Option A


This Question Belongs to Python Program >> Sets In Python

Join The Discussion

Related Questions on Sets in Python