E 6.
Modify the
Set
constructor to accept an optional variable argument to which a collection of initial values can be passed to initialize the set. The prototype for the new
Set
constructor should look as follows:
def __init__(self, *initElements)
It can then be used as shown here to create a set initialized with the given values:
s = Set(150, 75, 23, 86, 49)