mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
Implements list.remove (in terms of list.index and list.pop).
Fixes issue #63.
This commit is contained in:
9
tests/basics/tests/list_remove.py
Normal file
9
tests/basics/tests/list_remove.py
Normal 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")
|
||||
Reference in New Issue
Block a user