add remove method to set
This commit is contained in:
parent
e8c6ce4684
commit
69926eaee0
|
@ -7,6 +7,8 @@ class Set:
|
|||
return self.elts.keys()
|
||||
def has_elt(self, elt):
|
||||
return self.elts.has_key(elt)
|
||||
def remove(self, elt):
|
||||
del self.elts[elt]
|
||||
|
||||
class Stack:
|
||||
def __init__(self):
|
||||
|
|
|
@ -7,6 +7,8 @@ class Set:
|
|||
return self.elts.keys()
|
||||
def has_elt(self, elt):
|
||||
return self.elts.has_key(elt)
|
||||
def remove(self, elt):
|
||||
del self.elts[elt]
|
||||
|
||||
class Stack:
|
||||
def __init__(self):
|
||||
|
|
Loading…
Reference in New Issue