Solved

In the Code for the __Sub__ Method for the AbstractSet

Question 4

Multiple Choice

In the code for the __sub__ method for the AbstractSet class, what is the missing code? def __sub__(self, other) :
Difference = type(self) ()
For item in self:
If not item in other:
< missing code >
Return difference


A) difference.remove(item)
B) intersection.add(item)
C) difference.add(item)
D) return(item)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions