Implements list.remove (in terms of list.index and list.pop).

Fixes issue #63.
This commit is contained in:
John R. Lenton
2014-01-04 01:56:53 +00:00
parent f1c6ad46af
commit 49fb6e53b3
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
a = [1, 2, 3]
print(a.remove(2))
print(a)
try:
a.remove(2)
except ValueError:
print("Raised ValueError")
else:
raise AssertionError("Did not raise ValueError")