Commit e26d9aac authored by Robert Bradshaw's avatar Robert Bradshaw

del item test

parent a86eb386
......@@ -4,6 +4,10 @@
[2, 1]
>>> a.g()
(False, True)
>>> del_item({1: 'a', 2: 'b'}, 1)
{2: 'b'}
>>> del_item(range(10), 2)
[0, 1, 3, 4, 5, 6, 7, 8, 9]
"""
class A:
......@@ -16,3 +20,7 @@ class A:
self.a = 3
del self.a
return (hasattr(self, u"a"), hasattr(self, u"g"))
def del_item(L, o):
del L[o]
return L
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment