mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
Add pop method.
This commit is contained in:
parent
3dd7f3fef0
commit
bf0db032cd
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ class UserList:
|
||||||
__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…
Add table
Add a link
Reference in a new issue