mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
add remove method to set
This commit is contained in:
parent
e8c6ce4684
commit
69926eaee0
2 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue