mirror of https://github.com/python/cpython.git
Add pop method.
This commit is contained in:
parent
3dd7f3fef0
commit
bf0db032cd
|
@ -43,6 +43,7 @@ def __mul__(self, n):
|
||||||
__rmul__ = __mul__
|
__rmul__ = __mul__
|
||||||
def append(self, item): self.data.append(item)
|
def append(self, item): self.data.append(item)
|
||||||
def insert(self, i, item): self.data.insert(i, item)
|
def insert(self, i, item): self.data.insert(i, item)
|
||||||
|
def pop(self, i=-1): return self.data.pop(i)
|
||||||
def remove(self, item): self.data.remove(item)
|
def remove(self, item): self.data.remove(item)
|
||||||
def count(self, item): return self.data.count(item)
|
def count(self, item): return self.data.count(item)
|
||||||
def index(self, item): return self.data.index(item)
|
def index(self, item): return self.data.index(item)
|
||||||
|
|
Loading…
Reference in New Issue