...

/

Quiz Yourself on Sets

Quiz Yourself on Sets

Test your knowledge of sets.

We'll cover the following...

Quiz

1.

What will be the output of the following program?

s = {1,2,3,7,6,4}
s.discard(10)
s.remove(10)
print(s)
A.

The s.discard() method will report an error.

B.

The s.remove() method will report an error.

C.

{1, 2, 3, 4, 6, 7}

D.

None of the above


1 / 8